[PATCH] D97855: [runtimes] Fix crosscompiling after a7cad6680b4087eff8994f1f99ac40c661a6621f (D97451)
Raul Tambre via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 3 06:32:17 PST 2021
tambre created this revision.
tambre added reviewers: zero9178, mstorsjo, phosek, rnk.
Herald added a subscriber: mgorny.
tambre requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
It moved the logic for CMake target arguments into llvm_ExternalProject_Add().
No handling was added for CMAKE_CROSSCOMPILING, which has a separate set of compiler_args.
This broke crosscompiling, as now the runtimes builds defaulted to the compiler's default.
I've also added passing of CMAKE_ASM_COMPILER, which was missing before although we were passing the triple for it.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D97855
Files:
llvm/cmake/modules/LLVMExternalProjectUtils.cmake
Index: llvm/cmake/modules/LLVMExternalProjectUtils.cmake
===================================================================
--- llvm/cmake/modules/LLVMExternalProjectUtils.cmake
+++ llvm/cmake/modules/LLVMExternalProjectUtils.cmake
@@ -238,8 +238,12 @@
endif()
if(CMAKE_CROSSCOMPILING)
- set(compiler_args -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
+ set(compiler_args -DCMAKE_ASM_COMPILER=${CMAKE_ASM_COMPILER}
+ -DCMAKE_ASM_COMPILER_TARGET=${ARG_TARGET_TRIPLE}
+ -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
+ -DCMAKE_C_COMPILER_TARGET=${ARG_TARGET_TRIPLE}
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
+ -DCMAKE_CXX_COMPILER_TARGET=${ARG_TARGET_TRIPLE}
-DCMAKE_LINKER=${CMAKE_LINKER}
-DCMAKE_AR=${CMAKE_AR}
-DCMAKE_RANLIB=${CMAKE_RANLIB}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97855.327768.patch
Type: text/x-patch
Size: 919 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210303/f588e213/attachment.bin>
More information about the llvm-commits
mailing list