summaryrefslogtreecommitdiffstats
path: root/compiler-rt/cmake/config-ix.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'compiler-rt/cmake/config-ix.cmake')
-rw-r--r--compiler-rt/cmake/config-ix.cmake6
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
OpenPOWER on IntegriCloud