diff options
author | Chris Bieneman <beanz@apple.com> | 2016-05-03 19:48:11 +0000 |
---|---|---|
committer | Chris Bieneman <beanz@apple.com> | 2016-05-03 19:48:11 +0000 |
commit | 4e4d4302a346a8619da1ea3ddf2f9fdc13f572b0 (patch) | |
tree | 2215369bb14f6832b24cc6b642d8f01ceeffe8f9 /cmake/Modules/CompilerRTUtils.cmake | |
parent | e3884fe1b5d4cd3fad6aa18bca82a57a2b1be492 (diff) |
[CMake] NFC. Add support for testing the compiler without testing the linker
Summary:
One of the big limitations we have in the compiler-rt build system today is that we cannot bootstrap building the builtins because you need a fully functional toolchain to pass CMake's tests.
This change adds support for compile only tests.
It is NFC because nothing is using the compile-only tests yet.
I believe this is the last separable part of D16653.
Reviewers: samsonov
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D19692
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@268427 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake/Modules/CompilerRTUtils.cmake')
-rw-r--r-- | cmake/Modules/CompilerRTUtils.cmake | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cmake/Modules/CompilerRTUtils.cmake b/cmake/Modules/CompilerRTUtils.cmake index 4d16ca7be..b4a2b489b 100644 --- a/cmake/Modules/CompilerRTUtils.cmake +++ b/cmake/Modules/CompilerRTUtils.cmake @@ -114,6 +114,8 @@ macro(test_target_arch arch def) check_compile_definition("${def}" "${argstring}" HAS_${arch}_DEF) if(NOT HAS_${arch}_DEF) set(CAN_TARGET_${arch} FALSE) + elseif(TEST_COMPILE_ONLY) + try_compile_only(CAN_TARGET_${arch} ${TARGET_${arch}_CFLAGS}) else() set(argstring "${CMAKE_EXE_LINKER_FLAGS} ${argstring}") try_compile(CAN_TARGET_${arch} ${CMAKE_BINARY_DIR} ${SIMPLE_SOURCE} |