[compiler-rt] r216083 - Fix latent bug in try_compile macro and use CMAKE_EXE_LINKER_FLAGS
Alexey Samsonov
vonosmas at gmail.com
Wed Aug 20 10:12:59 PDT 2014
Author: samsonov
Date: Wed Aug 20 12:12:58 2014
New Revision: 216083
URL: http://llvm.org/viewvc/llvm-project?rev=216083&view=rev
Log:
Fix latent bug in try_compile macro and use CMAKE_EXE_LINKER_FLAGS
when testing for supported architectures, as suggested by Andy Gibbs.
Modified:
compiler-rt/trunk/cmake/config-ix.cmake
Modified: compiler-rt/trunk/cmake/config-ix.cmake
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/config-ix.cmake?rev=216083&r1=216082&r2=216083&view=diff
==============================================================================
--- compiler-rt/trunk/cmake/config-ix.cmake (original)
+++ compiler-rt/trunk/cmake/config-ix.cmake Wed Aug 20 12:12:58 2014
@@ -66,10 +66,14 @@ file(WRITE ${SIMPLE_SOURCE} "#include <s
# 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
More information about the llvm-commits
mailing list