summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorTimur Iskhodzhanov <timurrrr@google.com>2014-05-12 08:55:20 +0000
committerTimur Iskhodzhanov <timurrrr@google.com>2014-05-12 08:55:20 +0000
commit7c70734220d978df0beb6f83638971a3e4514459 (patch)
tree89f9cc5f769b044bebaf25aa6a496bb485c60372 /CMakeLists.txt
parentf19b9748325376109a89218554c4dc17264e779a (diff)
[ASan tests] Use clang-cl to build tests on Windows
Reviewed at http://reviews.llvm.org/D3680 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208526 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt13
1 files changed, 11 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e1a7a1f04..87e1fadb3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -57,8 +57,17 @@ if (NOT COMPILER_RT_STANDALONE_BUILD)
${LLVM_INCLUDE_TESTS})
option(COMPILER_RT_ENABLE_WERROR "Fail and stop if warning is triggered"
${LLVM_ENABLE_WERROR})
- # Use just-built Clang to compile/link tests.
- set(COMPILER_RT_TEST_COMPILER ${LLVM_RUNTIME_OUTPUT_INTDIR}/clang)
+ # Use just-built Clang to compile/link tests on all platforms, except for
+ # Windows where we need to use clang-cl instead.
+ if(NOT MSVC)
+ set(COMPILER_RT_TEST_COMPILER ${LLVM_RUNTIME_OUTPUT_INTDIR}/clang)
+ set(COMPILER_RT_TEST_COMPILER_EXE "-o")
+ set(COMPILER_RT_TEST_COMPILER_OBJ "-o")
+ else()
+ set(COMPILER_RT_TEST_COMPILER ${LLVM_RUNTIME_OUTPUT_INTDIR}/clang-cl.exe)
+ set(COMPILER_RT_TEST_COMPILER_EXE "-Fe")
+ set(COMPILER_RT_TEST_COMPILER_OBJ "-Fo")
+ endif()
else()
# Take output dir and install path from the user.
set(COMPILER_RT_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH