[compiler-rt] [compiler-rt] Make add_custom_libcxx() resilient to DESTDIR being set (PR #115525)
    Alexander Richardson via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Sun Nov 10 12:36:16 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"
----------------
arichardson wrote:
Ah I guess I had a newer CMake, we can make this conditional on CMake version.
https://github.com/llvm/llvm-project/pull/115525
    
    
More information about the llvm-commits
mailing list