[PATCH] D23654: [CMake] Rename back SIMPLE_SOURCE to compile as C++

Jonas Hahnfeld via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 18 05:22:12 PDT 2016


Hahnfeld created this revision.
Hahnfeld added reviewers: fjricci, samsonov, compnerd, beanz.
Hahnfeld added a subscriber: llvm-commits.

This was changed in rL276151 and causes problems if the C++ compiler does not support the same arches as the C compiler.
For the builtins, only the C compiler is tested in `try_compile_only`.

https://reviews.llvm.org/D23654

Files:
  cmake/config-ix.cmake

Index: cmake/config-ix.cmake
===================================================================
--- cmake/config-ix.cmake
+++ 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.68513.patch
Type: text/x-patch
Size: 650 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160818/0b14279c/attachment-0001.bin>


More information about the llvm-commits mailing list