[libcxx] Support LIBCXX_STATICALLY_LINK_ABI_IN_STATIC_LIBRARY + LIBCXX_ENABLE_ABI_LINKER_SCRIPT
Currently if both LIBCXX_STATICALLY_LINK_ABI_IN_STATIC_LIBRARY (only applies to static library) and LIBCXX_ENABLE_ABI_LINKER_SCRIPT (only applies to shared library) are enabled, the former will be silently ignored. The shared library will use a linker script, while the static library fails to link libc++abi.a entirely. This is caused by what appears to be an implementation bug: The LIBCXX_STATICALLY_LINK_ABI_IN_*_LIBRARY options are declared as dependent options of LIBCXX_ENABLE_STATIC_ABI_LIBRARY, rather than simply using it as the default value. Of course, the combination of LIBCXX_STATICALLY_LINK_ABI_IN_SHARED_LIBRARY and LIBCXX_ENABLE_ABI_LINKER_SCRIPT still results in a cmake error, because these would be conflicting requests for the shared library. Differential Revision: https://reviews.llvm.org/D134644
Loading
Please sign in to comment