[PATCH] D97855: [runtimes] Fix crosscompiling after a7cad6680b4087eff8994f1f99ac40c661a6621f (D97451)
Raul Tambre via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 3 08:58:20 PST 2021
tambre updated this revision to Diff 327817.
tambre marked an inline comment as done.
tambre added a comment.
Move ARG_TARGET_TRIPLE block down to simplify code.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97855/new/
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
@@ -211,12 +211,6 @@
list(APPEND compiler_args -DCMAKE_STRIP=${ARG_STRIP_TOOL})
endif()
- if (ARG_TARGET_TRIPLE)
- list(APPEND compiler_args -DCMAKE_C_COMPILER_TARGET=${ARG_TARGET_TRIPLE})
- list(APPEND compiler_args -DCMAKE_CXX_COMPILER_TARGET=${ARG_TARGET_TRIPLE})
- list(APPEND compiler_args -DCMAKE_ASM_COMPILER_TARGET=${ARG_TARGET_TRIPLE})
- endif()
-
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${name}-clobber-stamp
DEPENDS ${ARG_DEPENDS}
@@ -238,7 +232,8 @@
endif()
if(CMAKE_CROSSCOMPILING)
- set(compiler_args -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
+ set(compiler_args -DCMAKE_ASM_COMPILER=${CMAKE_ASM_COMPILER}
+ -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-DCMAKE_LINKER=${CMAKE_LINKER}
-DCMAKE_AR=${CMAKE_AR}
@@ -279,6 +274,12 @@
set(cmake_args ${ARG_CMAKE_ARGS})
endif()
+ if(ARG_TARGET_TRIPLE)
+ list(APPEND compiler_args -DCMAKE_C_COMPILER_TARGET=${ARG_TARGET_TRIPLE})
+ list(APPEND compiler_args -DCMAKE_CXX_COMPILER_TARGET=${ARG_TARGET_TRIPLE})
+ list(APPEND compiler_args -DCMAKE_ASM_COMPILER_TARGET=${ARG_TARGET_TRIPLE})
+ endif()
+
ExternalProject_Add(${name}
DEPENDS ${ARG_DEPENDS} llvm-config
${name}-clobber
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97855.327817.patch
Type: text/x-patch
Size: 1585 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210303/9d1e12cb/attachment.bin>
More information about the llvm-commits
mailing list