forked from OSchip/llvm-project
[CMake] Make simple source used for CMake checks a C file
The source being compiled is plain C, but using .cc extension forces it to be compiled as C++ which requires a working C++ compiler including C++ library which may not be the case when we're building compiler-rt together with libcxx as part of runtimes build. Differential Revision: https://reviews.llvm.org/D46152 llvm-svn: 331003
This commit is contained in:
parent
2c9cc9c731
commit
887fbc61d4
|
@ -125,7 +125,7 @@ set(COMPILER_RT_SUPPORTED_ARCH)
|
|||
# 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.cc)
|
||||
set(SIMPLE_SOURCE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/simple.c)
|
||||
file(WRITE ${SIMPLE_SOURCE} "#include <stdlib.h>\n#include <stdio.h>\nint main() { printf(\"hello, world\"); }\n")
|
||||
|
||||
# Detect whether the current target platform is 32-bit or 64-bit, and setup
|
||||
|
|
Loading…
Reference in New Issue