Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] AutotoolsToolchain: define environment when building for Android #13443

Closed
jcar87 opened this issue Mar 14, 2023 · 1 comment · Fixed by #16502
Closed

[feature] AutotoolsToolchain: define environment when building for Android #13443

jcar87 opened this issue Mar 14, 2023 · 1 comment · Fixed by #16502
Assignees
Milestone

Comments

@jcar87
Copy link
Contributor

jcar87 commented Mar 14, 2023

What is your suggestion?

When targetting Android and building something that requires Autotools, we need to define CC, CXX, etc, as described here: https://developer.android.com/ndk/guides/other_build_systems

if os=Android, if os.api_level and tools.android:ndk_path are defined in the profile, we have enough information to derive the correct environment variables as per the Android NDK documentation.

Currently tools.android:ndk_path is sufficient for CMakeToolchain, but not for Autotools, resulting in having to define additional variables in the profile. We could consider doing this implicitly.

See: #13373 (comment)

@SpaceIm
Copy link
Contributor

SpaceIm commented Mar 15, 2023

We could consider doing this implicitly.

Is it really the responsibility of conan build helpers to do babysitting of cross-compilers (I mean set CC, CXX, STRIP, AR, LD, RANLIB etc, I thought it was always the responsibility of user profiles)? I'm wondering if it will not lead to crazy expectations while using conancenter recipes based on custom build systems.
It may also break android-ndk recipe depending on how it's implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants