summaryrefslogtreecommitdiffstats
path: root/compiler-rt
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2014-02-19 13:45:49 +0000
committerAlexey Samsonov <samsonov@google.com>2014-02-19 13:45:49 +0000
commit8067448dfe175e196af25ec345a7c3394923ff5c (patch)
treee0f33b8b54e7ee0bf667a25f91b8c8ee507c3aac /compiler-rt
parentcba008e9c50388db568123bc5b887aed43131211 (diff)
downloadbcm5719-llvm-8067448dfe175e196af25ec345a7c3394923ff5c.tar.gz
bcm5719-llvm-8067448dfe175e196af25ec345a7c3394923ff5c.zip
[CMake] Use host compiler to run lit tests in standalone mode
llvm-svn: 201674
Diffstat (limited to 'compiler-rt')
-rw-r--r--compiler-rt/CMakeLists.txt5
-rw-r--r--compiler-rt/test/lit.common.configured.in2
2 files changed, 3 insertions, 4 deletions
diff --git a/compiler-rt/CMakeLists.txt b/compiler-rt/CMakeLists.txt
index 1ed6b9e5fbe..00c11712f0c 100644
--- a/compiler-rt/CMakeLists.txt
+++ b/compiler-rt/CMakeLists.txt
@@ -41,8 +41,7 @@ if (NOT COMPILER_RT_STANDALONE_BUILD)
option(COMPILER_RT_INCLUDE_TESTS "Generate and build compiler-rt unit tests."
${LLVM_INCLUDE_TESTS})
# Use just-built Clang to compile/link tests.
- # FIXME: Use an absolute path instead.
- set(COMPILER_RT_TEST_COMPILER clang)
+ set(COMPILER_RT_TEST_COMPILER ${LLVM_RUNTIME_OUTPUT_INTDIR}/clang)
else()
# Take output dir and install path from the user.
set(COMPILER_RT_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH
@@ -51,7 +50,7 @@ else()
"Path where built compiler-rt libraries should be installed.")
option(COMPILER_RT_INCLUDE_TESTS "Generate and build compiler-rt unit tests." OFF)
# Use a host compiler to compile/link tests.
- set(COMPILER_RT_TEST_COMPILER ${CMAKE_CXX_COMPILER})
+ set(COMPILER_RT_TEST_COMPILER ${CMAKE_C_COMPILER})
set(LLVM_CONFIG_PATH "" CACHE PATH "Path to llvm-config binary")
if (NOT LLVM_CONFIG_PATH)
diff --git a/compiler-rt/test/lit.common.configured.in b/compiler-rt/test/lit.common.configured.in
index 3b1083021f4..c49e57e8b1c 100644
--- a/compiler-rt/test/lit.common.configured.in
+++ b/compiler-rt/test/lit.common.configured.in
@@ -15,7 +15,7 @@ set_default("llvm_src_root", "@LLVM_SOURCE_DIR@")
set_default("llvm_obj_root", "@LLVM_BINARY_DIR@")
set_default("compiler_rt_src_root", "@COMPILER_RT_SOURCE_DIR@")
set_default("llvm_tools_dir", "@LLVM_TOOLS_DIR@")
-set_default("clang", "@LLVM_BINARY_DIR@/bin/clang")
+set_default("clang", "@COMPILER_RT_TEST_COMPILER@")
set_default("compiler_rt_arch", "@COMPILER_RT_SUPPORTED_ARCH@")
set_default("python_executable", "@PYTHON_EXECUTABLE@")
set_default("compiler_rt_debug", @COMPILER_RT_DEBUG_PYBOOL@)
OpenPOWER on IntegriCloud