diff options
author | Timur Iskhodzhanov <timurrrr@google.com> | 2014-05-12 08:55:20 +0000 |
---|---|---|
committer | Timur Iskhodzhanov <timurrrr@google.com> | 2014-05-12 08:55:20 +0000 |
commit | 7c70734220d978df0beb6f83638971a3e4514459 (patch) | |
tree | 89f9cc5f769b044bebaf25aa6a496bb485c60372 /cmake/Modules | |
parent | f19b9748325376109a89218554c4dc17264e779a (diff) | |
download | compiler-rt-7c70734220d978df0beb6f83638971a3e4514459.tar.gz |
[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 'cmake/Modules')
-rw-r--r-- | cmake/Modules/AddCompilerRT.cmake | 4 | ||||
-rw-r--r-- | cmake/Modules/CompilerRTCompile.cmake | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmake index ba22927d7..5b3b740bb 100644 --- a/cmake/Modules/AddCompilerRT.cmake +++ b/cmake/Modules/AddCompilerRT.cmake @@ -137,7 +137,9 @@ macro(add_compiler_rt_test test_suite test_name) list(APPEND TEST_DEPS clang) endif() add_custom_target(${test_name} - COMMAND ${COMPILER_RT_TEST_COMPILER} ${TEST_OBJECTS} -o "${output_bin}" + # MSVS CL doesn't allow a space between -Fe and the output file name. + COMMAND ${COMPILER_RT_TEST_COMPILER} ${TEST_OBJECTS} + ${COMPILER_RT_TEST_COMPILER_EXE}"${output_bin}" ${TEST_LINK_FLAGS} DEPENDS ${TEST_DEPS}) # Make the test suite depend on the binary. diff --git a/cmake/Modules/CompilerRTCompile.cmake b/cmake/Modules/CompilerRTCompile.cmake index b3482e9ce..4885c82e7 100644 --- a/cmake/Modules/CompilerRTCompile.cmake +++ b/cmake/Modules/CompilerRTCompile.cmake @@ -23,7 +23,9 @@ macro(clang_compile object_file source) set(compile_flags ${global_flags} ${SOURCE_CFLAGS}) add_custom_command( OUTPUT ${object_file} - COMMAND ${COMPILER_RT_TEST_COMPILER} ${compile_flags} -c -o "${object_file}" + # MSVS CL doesn't allow a space between -Fo and the object file name. + COMMAND ${COMPILER_RT_TEST_COMPILER} ${compile_flags} -c + ${COMPILER_RT_TEST_COMPILER_OBJ}"${object_file}" ${source_rpath} MAIN_DEPENDENCY ${source} DEPENDS ${SOURCE_DEPS}) |