[PATCH] D112855: [llvm] Include LLVM_ENABLE_RUNTIMES in the cross compilation invocation

Jonas Devlieghere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 29 16:23:27 PDT 2021


JDevlieghere created this revision.
JDevlieghere added reviewers: phosek, ldionne, smeenai.
Herald added a subscriber: mgorny.
JDevlieghere requested review of this revision.
Herald added a project: LLVM.

Forward the `LLVM_ENABLE_RUNTIMES` cmake variable in the cross compilation invocation.

Now that passing `libcxx` must be specified in `LLVM_ENABLE_RUNTIMES` instead of `LLVM_ENABLE_PROJECTS`, the LLDB's sanity check for libcxx trips up (in the cross compilation case) because the runtimes are not forwarded. This patch fixes that.


https://reviews.llvm.org/D112855

Files:
  llvm/cmake/modules/CrossCompile.cmake


Index: llvm/cmake/modules/CrossCompile.cmake
===================================================================
--- llvm/cmake/modules/CrossCompile.cmake
+++ llvm/cmake/modules/CrossCompile.cmake
@@ -57,6 +57,8 @@
          "${LLVM_ENABLE_PROJECTS}")
   string(REPLACE ";" "$<SEMICOLON>" llvm_external_projects_arg
          "${LLVM_EXTERNAL_PROJECTS}")
+  string(REPLACE ";" "$<SEMICOLON>" llvm_enable_runtimes_arg
+         "${LLVM_ENABLE_RUNTIMES}")
 
   set(external_project_source_dirs)
   foreach(project ${LLVM_EXTERNAL_PROJECTS})
@@ -77,6 +79,7 @@
         -DLLVM_TARGET_ARCH="${LLVM_TARGET_ARCH}"
         -DLLVM_ENABLE_PROJECTS="${llvm_enable_projects_arg}"
         -DLLVM_EXTERNAL_PROJECTS="${llvm_external_projects_arg}"
+        -DLLVM_ENABLE_RUNTIMES="${llvm_enable_runtimes_arg}"
         ${external_project_source_dirs}
         -DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN="${LLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN}"
         ${build_type_flags} ${linker_flag} ${external_clang_dir}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112855.383524.patch
Type: text/x-patch
Size: 994 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211029/e2ed388f/attachment.bin>


More information about the llvm-commits mailing list