You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Compiling an Android NDK library with -lc++ links the C++ shared library even with ANDROID_STL=c++_static. #2229
Compiling an Android NDK shared library with -lc++ links the C++ shared library even with ANDROID_STL=c++_static.
I'm not sure if this is intended behavior or not, or if you're not supposed to have -lc++ when doing static builds, but this seems to break some of the dependencies that VCPKG builds which adds the implicit cxx linker libraries to their transitive dependencies. I imagine it would make more sense that a library linking to libc++ through the -lc++ flag should still link to the static library.
Test Case:
Checkout the ndk_bug branch, follow README and build the library.
Run llvm-readelf.exe -d libndktest.so, the output will show libc++_shared.so is needed.
changed the title [-][BUG][/-][+][BUG] Compiling an Android NDK library with -lc++ links the C++ shared library even with ANDROID_STL=c++_static.[/+]on Mar 31, 2026
Activity
[-][BUG][/-][+][BUG] Compiling an Android NDK library with -lc++ links the C++ shared library even with ANDROID_STL=c++_static.[/+]