[PATCH] D103950: [compiler-rt] Allow setting compilers for unit tests
Eugene Leviant via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 9 02:50:31 PDT 2021
evgeny777 created this revision.
evgeny777 added reviewers: beanz, eugenis, dangyi, daltenty, rnk.
Herald added subscribers: mgorny, dberris.
evgeny777 requested review of this revision.
For in-tree cross compilations compiler-rt chooses compilers built for target platform and fails to compile when host and target architectures do not match.
https://reviews.llvm.org/D103950
Files:
compiler-rt/cmake/base-config-ix.cmake
Index: compiler-rt/cmake/base-config-ix.cmake
===================================================================
--- compiler-rt/cmake/base-config-ix.cmake
+++ compiler-rt/cmake/base-config-ix.cmake
@@ -58,10 +58,14 @@
else()
set(_host_executable_suffix ${CMAKE_EXECUTABLE_SUFFIX})
endif()
- set(COMPILER_RT_TEST_COMPILER
- ${LLVM_RUNTIME_OUTPUT_INTDIR}/clang${_host_executable_suffix})
- set(COMPILER_RT_TEST_CXX_COMPILER
- ${LLVM_RUNTIME_OUTPUT_INTDIR}/clang++${_host_executable_suffix})
+ if (NOT COMPILER_RT_TEST_COMPILER)
+ set(COMPILER_RT_TEST_COMPILER
+ ${LLVM_RUNTIME_OUTPUT_INTDIR}/clang${_host_executable_suffix})
+ endif()
+ if (NOT COMPILER_RT_TEST_CXX_COMPILER)
+ set(COMPILER_RT_TEST_CXX_COMPILER
+ ${LLVM_RUNTIME_OUTPUT_INTDIR}/clang++${_host_executable_suffix})
+ endif()
else()
# Take output dir and install path from the user.
set(COMPILER_RT_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103950.350832.patch
Type: text/x-patch
Size: 960 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210609/1b32bf72/attachment.bin>
More information about the llvm-commits
mailing list