Description
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.
https://github.com/KKhanhH/test_vcpkg_libass/tree/ndk_bug
(Ignore repository name, I'm using another branch to file another bug on vcpkg's end as well.)
Reproducible on NDK r28 and r29
I am using a supported NDK
Affected versions
r29
Description
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.https://github.com/KKhanhH/test_vcpkg_libass/tree/ndk_bug
(Ignore repository name, I'm using another branch to file another bug on vcpkg's end as well.)
Reproducible on NDK r28 and r29
I am using a supported NDK
Affected versions
r29