[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
Sun Feb 15 21:42:48 PST 2026
petrhosek wrote:
I apologize for necromancing this PR, but while looking over CMake changelog in the context of https://discourse.llvm.org/t/rfc-2026-upgrading-llvm-s-minimum-required-cmake-version/89829, I noticed that starting in CMake 3.30, [`add_library()` rejects `SHARED` libraries when not supported by the platform](https://cmake.org/cmake/help/latest/policy/CMP0164.html#policy:CMP0164). That's going to break builds on platforms that do not support shared libraries such as baremetal as a result of this change. We can ignore the policy as an interim solution, but in the long run we'll need a different solution. One option would be to define `cxx_shared` as empty interface target on platforms that do not support shared libraries.
https://github.com/llvm/llvm-project/pull/80007
More information about the cfe-commits
mailing list