[compiler-rt] 3203c96 - [CMake][compiler-rt][RISCV] Support RISC-V cross-compilation
Luís Marques via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 31 15:53:26 PST 2021
Author: Luís Marques
Date: 2021-01-31T23:52:57Z
New Revision: 3203c968424193a519d1b52739047748038bb074
URL: https://github.com/llvm/llvm-project/commit/3203c968424193a519d1b52739047748038bb074
DIFF: https://github.com/llvm/llvm-project/commit/3203c968424193a519d1b52739047748038bb074.diff
LOG: [CMake][compiler-rt][RISCV] Support RISC-V cross-compilation
This seems to be a safe way to ensure that the Compiler-RT test compiler
flags are properly set in all cross-compilation scenarios. Without this
when `BUILTINS_TEST_TARGET_CFLAGS` is set in
`compiler-rt/test/builtins/CMakeLists.txt` the other flags are cleared.
Differential Revision: https://reviews.llvm.org/D92124
Added:
Modified:
compiler-rt/cmake/config-ix.cmake
Removed:
################################################################################
diff --git a/compiler-rt/cmake/config-ix.cmake b/compiler-rt/cmake/config-ix.cmake
index 813573802aec..47039a312934 100644
--- a/compiler-rt/cmake/config-ix.cmake
+++ b/compiler-rt/cmake/config-ix.cmake
@@ -219,7 +219,7 @@ endfunction()
# specific architecture. When cross-compiling, this is controled via
# COMPILER_RT_TEST_COMPILER and COMPILER_RT_TEST_COMPILER_CFLAGS.
macro(get_test_cc_for_arch arch cc_out cflags_out)
- if(ANDROID OR ${arch} MATCHES "arm|aarch64")
+ if(ANDROID OR ${arch} MATCHES "arm|aarch64|riscv32|riscv64")
# This is only true if we are cross-compiling.
# Build all tests with host compiler and use host tools.
set(${cc_out} ${COMPILER_RT_TEST_COMPILER})
More information about the llvm-commits
mailing list