[libcxx] [libcxxabi] [libunwind] [runtimes] Always define cxx_shared, cxx_static & other targets (PR #80007)
Petr Hosek via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 9 21:27:04 PDT 2024
petrhosek wrote:
> @petrhosek Where is the cache generating that build?
>
> The fix for this is:
>
> ```
> # On embedded platforms that don't support shared library targets, CMake implicitly changes shared
> # library targets to be static library targets. This results in duplicate definitions of the static
> # library targets even though we might not ever build the shared library target, which breaks the
> # build. To work around this, we change the output name of the shared library target so that it
> # can't conflict with the static library target.
> #
> # This is tracked by https://gitlab.kitware.com/cmake/cmake/-/issues/25759.
> set(LIBCXX_SHARED_OUTPUT_NAME "c++-shared" CACHE STRING "")
> set(LIBCXXABI_SHARED_OUTPUT_NAME "c++abi-shared" CACHE STRING "")
> set(LIBUNWIND_SHARED_OUTPUT_NAME "unwind-shared" CACHE STRING "")
> ```
With #111791 everything builds without any issues.
https://github.com/llvm/llvm-project/pull/80007
More information about the cfe-commits
mailing list