[compiler-rt] [compiler-rt] Make add_custom_libcxx() resilient to DESTDIR being set (PR #115525)
Björn Pettersson via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 10 02:59:57 PST 2024
================
@@ -713,6 +713,9 @@ macro(add_custom_libcxx name prefix)
USES_TERMINAL_INSTALL 1
LIST_SEPARATOR |
EXCLUDE_FROM_ALL TRUE
+ # Ensure that DESTDIR=... set in the out environment does not affect this
+ # target (we always need to install to the build directory).
+ INSTALL_COMMAND env DESTDIR= ${CMAKE_COMMAND} --build ${prefix}/build --target install
INSTALL_BYPRODUCTS "${prefix}/lib/libc++.a" "${prefix}/lib/libc++abi.a"
----------------
bjope wrote:
With the INSTALL_COMMAND fix we now get this:
```
[2091/2122] Performing install step for 'libcxx_fuzzer_x86_64'
ninja: error: unknown target 'INSTALL_BYPRODUCTS'
FAILED: compiler-rt/lib/fuzzer/libcxx_fuzzer_x86_64/src/libcxx_fuzzer_x86_64-stamp/libcxx_fuzzer_x86_64-install
```
https://github.com/llvm/llvm-project/pull/115525
More information about the llvm-commits
mailing list