diff options
author | Alexey Samsonov <vonosmas@gmail.com> | 2014-08-20 17:12:58 +0000 |
---|---|---|
committer | Alexey Samsonov <vonosmas@gmail.com> | 2014-08-20 17:12:58 +0000 |
commit | 6d2022b2e04ff7b708b9c4c2e7aa8af20b8eeb79 (patch) | |
tree | 04d8d19f4fe587ddadc5ad5bf5bef57ed6319d6e /compiler-rt | |
parent | fdd769e84701ea9a6fb2fef9a7f0a30971e23659 (diff) | |
download | bcm5719-llvm-6d2022b2e04ff7b708b9c4c2e7aa8af20b8eeb79.tar.gz bcm5719-llvm-6d2022b2e04ff7b708b9c4c2e7aa8af20b8eeb79.zip |
Fix latent bug in try_compile macro and use CMAKE_EXE_LINKER_FLAGS
when testing for supported architectures, as suggested by Andy Gibbs.
llvm-svn: 216083
Diffstat (limited to 'compiler-rt')
-rw-r--r-- | compiler-rt/cmake/config-ix.cmake | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler-rt/cmake/config-ix.cmake b/compiler-rt/cmake/config-ix.cmake index a5334fcc29b..154092fd548 100644 --- a/compiler-rt/cmake/config-ix.cmake +++ b/compiler-rt/cmake/config-ix.cmake @@ -66,10 +66,14 @@ file(WRITE ${SIMPLE_SOURCE} "#include <stdlib.h>\n#include <limits>\nint main() # architecture is supported by trying to build a simple file. macro(test_target_arch arch) set(TARGET_${arch}_CFLAGS ${ARGN}) + set(argstring "${CMAKE_EXE_LINKER_FLAGS}") + foreach(arg ${ARGN}) + set(argstring "${argstring} ${arg}") + endforeach() try_compile(CAN_TARGET_${arch} ${CMAKE_BINARY_DIR} ${SIMPLE_SOURCE} COMPILE_DEFINITIONS "${TARGET_${arch}_CFLAGS}" OUTPUT_VARIABLE TARGET_${arch}_OUTPUT - CMAKE_FLAGS "-DCMAKE_EXE_LINKER_FLAGS:STRING=${TARGET_${arch}_CFLAGS}") + CMAKE_FLAGS "-DCMAKE_EXE_LINKER_FLAGS:STRING=${argstring}") if(${CAN_TARGET_${arch}}) list(APPEND COMPILER_RT_SUPPORTED_ARCH ${arch}) elseif("${COMPILER_RT_TEST_TARGET_ARCH}" MATCHES "${arch}" OR |