[compiler-rt] 3f5f8f3 - [compiler-rt][CMake] Fix PowerPC runtime build
Jinsong Ji via llvm-commits
llvm-commits at lists.llvm.org
Mon May 18 12:46:56 PDT 2020
Author: Jinsong Ji
Date: 2020-05-18T19:46:43Z
New Revision: 3f5f8f39734e88c797b003d4a0002b2eaef1ac17
URL: https://github.com/llvm/llvm-project/commit/3f5f8f39734e88c797b003d4a0002b2eaef1ac17
DIFF: https://github.com/llvm/llvm-project/commit/3f5f8f39734e88c797b003d4a0002b2eaef1ac17.diff
LOG: [compiler-rt][CMake] Fix PowerPC runtime build
When build in runtime bulid mode with LLVM_ENABLE_RUNTIMES,
the base-config-ix.cmake will complain about two errors.
One is empty string in replace, the other one is unknown `TEST_BIG_ENDIAN ` command.
This patch fix it so that we can test runtime build.
Reviewed By: phosek
Differential Revision: https://reviews.llvm.org/D80040
Added:
Modified:
compiler-rt/cmake/base-config-ix.cmake
Removed:
################################################################################
diff --git a/compiler-rt/cmake/base-config-ix.cmake b/compiler-rt/cmake/base-config-ix.cmake
index b4b87aa53073..234cd7262b72 100644
--- a/compiler-rt/cmake/base-config-ix.cmake
+++ b/compiler-rt/cmake/base-config-ix.cmake
@@ -5,6 +5,7 @@
include(CheckIncludeFile)
include(CheckCXXSourceCompiles)
+include(TestBigEndian)
check_include_file(unwind.h HAVE_UNWIND_H)
@@ -191,7 +192,7 @@ macro(test_targets)
# Strip out -nodefaultlibs when calling TEST_BIG_ENDIAN. Configuration
# will fail with this option when building with a sanitizer.
cmake_push_check_state()
- string(REPLACE "-nodefaultlibs" "" CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
+ string(REPLACE "-nodefaultlibs" "" CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
TEST_BIG_ENDIAN(HOST_IS_BIG_ENDIAN)
cmake_pop_check_state()
More information about the llvm-commits
mailing list