[PATCH] D23654: [CMake] Rename back SIMPLE_SOURCE to compile as C++
Jonas Hahnfeld via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 20 22:52:54 PDT 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL282054: [CMake] Rename back SIMPLE_SOURCE to compile as C++ (authored by Hahnfeld).
Changed prior to commit:
https://reviews.llvm.org/D23654?vs=71901&id=72007#toc
Repository:
rL LLVM
https://reviews.llvm.org/D23654
Files:
compiler-rt/trunk/cmake/Modules/CompilerRTUtils.cmake
compiler-rt/trunk/cmake/config-ix.cmake
Index: compiler-rt/trunk/cmake/Modules/CompilerRTUtils.cmake
===================================================================
--- compiler-rt/trunk/cmake/Modules/CompilerRTUtils.cmake
+++ compiler-rt/trunk/cmake/Modules/CompilerRTUtils.cmake
@@ -132,8 +132,12 @@
try_compile_only(CAN_TARGET_${arch} ${TARGET_${arch}_CFLAGS})
else()
set(argstring "${CMAKE_EXE_LINKER_FLAGS} ${argstring}")
+ set(FLAG_NO_EXCEPTIONS "")
+ if(COMPILER_RT_HAS_FNO_EXCEPTIONS_FLAG)
+ set(FLAG_NO_EXCEPTIONS " -fno-exceptions ")
+ endif()
try_compile(CAN_TARGET_${arch} ${CMAKE_BINARY_DIR} ${SIMPLE_SOURCE}
- COMPILE_DEFINITIONS "${TARGET_${arch}_CFLAGS}"
+ COMPILE_DEFINITIONS "${TARGET_${arch}_CFLAGS} ${FLAG_NO_EXCEPTIONS}"
OUTPUT_VARIABLE TARGET_${arch}_OUTPUT
CMAKE_FLAGS "-DCMAKE_EXE_LINKER_FLAGS:STRING=${argstring}")
endif()
Index: compiler-rt/trunk/cmake/config-ix.cmake
===================================================================
--- compiler-rt/trunk/cmake/config-ix.cmake
+++ compiler-rt/trunk/cmake/config-ix.cmake
@@ -92,7 +92,7 @@
# platform. We use the results of these tests to build only the various target
# runtime libraries supported by our current compilers cross-compiling
# abilities.
-set(SIMPLE_SOURCE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/simple.c)
+set(SIMPLE_SOURCE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/simple.cc)
file(WRITE ${SIMPLE_SOURCE} "#include <stdlib.h>\n#include <stdio.h>\nint main() { printf(\"hello, world\"); }\n")
# Add $arch as supported with no additional flags.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23654.72007.patch
Type: text/x-patch
Size: 1641 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160921/3b3704db/attachment.bin>
More information about the llvm-commits
mailing list