[PATCH] D126313: [CMake] Don't pass CMAKE_C(XX)_COMPILER to the nested NATIVE build

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 21 12:00:26 PDT 2022


mstorsjo updated this revision to Diff 438790.
mstorsjo added a comment.

Keep passing the compiler to the nested cmake when not cross compiling.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D126313/new/

https://reviews.llvm.org/D126313

Files:
  llvm/cmake/modules/CrossCompile.cmake


Index: llvm/cmake/modules/CrossCompile.cmake
===================================================================
--- llvm/cmake/modules/CrossCompile.cmake
+++ llvm/cmake/modules/CrossCompile.cmake
@@ -15,6 +15,9 @@
   if (EXISTS ${LLVM_MAIN_SRC_DIR}/cmake/platforms/${toolchain}.cmake)
     set(CROSS_TOOLCHAIN_FLAGS_INIT
       -DCMAKE_TOOLCHAIN_FILE=\"${LLVM_MAIN_SRC_DIR}/cmake/platforms/${toolchain}.cmake\")
+  elseif (CMAKE_CROSSCOMPILING)
+    set(CROSS_TOOLCHAIN_FLAGS_INIT
+      )
   else()
     set(CROSS_TOOLCHAIN_FLAGS_INIT
       -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D126313.438790.patch
Type: text/x-patch
Size: 583 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220621/a3be20a9/attachment.bin>


More information about the llvm-commits mailing list