HaxeFoundation / HaxeFoundation/hxcpp
Add an option to disable static link to libc++ on Android/Clang
- Dominant language
- C++
- Stars
- 330
- Forks
- 227
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 18
Description
Currently, in `android-toolchain-clang.xml`, flag `-static-libstdc++` is used.
However, when using multiple shared libraries, it is recommended to link with libc++ dynamically (and embed libc++_shared.so in final apk) because multiple shared libraries with static link to libc++ can lead to undefined behavior. See this for reference: https://developer.android.com/ndk/guides/cpp-support
I understand that as long as we use a single .so in the final app, static link is easier, but there should be an option to disable it, like `HXCPP_LIBCPP_SHARED` or similar, that removes `-static-libstdc++` flag from the toolchain and make it default to shared libc++. (or make `-static-libstdc++` flag require `HXCPP_LIBCPP_STATIC`, that would work too).
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.