[PATCH] D32816: [CMake] Support multi-target runtimes build

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 25 20:52:05 PDT 2017


phosek added inline comments.


================
Comment at: cmake/modules/LLVMExternalProjectUtils.cmake:185
   if(NOT ARG_NO_INSTALL)
-    install(CODE "execute_process\(COMMAND \${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX=\${CMAKE_INSTALL_PREFIX} -P ${BINARY_DIR}/cmake_install.cmake \)"
+    install(CODE "execute_process\(COMMAND \${CMAKE_COMMAND} -P ${BINARY_DIR}/cmake_install.cmake \)"
       COMPONENT ${name})
----------------
jroelofs wrote:
> phosek wrote:
> > I'm not sure on what's the best way to handle the install prefix. When building runtimes for multiple targets, only one of them can use the "default" install prefix, others have to use a different one otherwise they'll overwrite each other files.
> I'd shove them all under: `lib/clang-runtimes/$triple/{lib,include}`, and specifically not use a "default" install prefix.
Now they will be installed in `$CMAKE_INSTALL_PREFIX/$target`, but I'd be happy to change that to `lib/runtimes/$target`. One issue I've noticed is that sanitizer and xray headers end up in `lib/runtimes/$target/lib/clang/5.0.0/include`. I don't know if those headers are target specific, but if not it would be better to install them in `lib/clang/5.0.0/include` same as for compiler headers.


Repository:
  rL LLVM

https://reviews.llvm.org/D32816





More information about the llvm-commits mailing list