Skip to content

Support building on Android #402

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

Closed
wants to merge 1 commit into from
Closed

Support building on Android #402

wants to merge 1 commit into from

Conversation

ndarilek
Copy link

I'm open to better name suggestions for bundled-android-static-libstdcpp. I don't know enough about clang/LLVM to know what the implications of that flag outside of Android are, but it's specifically mentioned at the above link for selecting a static runtime on Android so I wanted to make the feature clear and explicitly scoped.

* Remove `-stdlib=libstdc++` flag on Android since it breaks the build
* Add `bundled-android-static-libstdcpp` feature for selecting the static C++ runtime (I.e. https://developer.android.com/ndk/guides/cpp-support#use_clang_directly)
@ndarilek
Copy link
Author

I'd like to merge this if possible. Could I please get approval to run workflows?

Thanks.

@mlafeldt
Copy link
Member

Thanks for the PR.

Considering that Android support is still experimental, I'd like to avoid adding special compiler/linker flags that can affect other targets as hard-coded values to build.rs.

The good news is that we use the cc crate in build.rs, which allows you to override specific flags for your particular use case, e.g. via CXXFLAGS or CXXSTDLIB. See https://docs.rs/cc/latest/cc/#c-support

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

Successfully merging this pull request may close these issues.

2 participants