Skip to content

Commit 1b9070e

Browse files
committed
[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 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@331003 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 180743b commit 1b9070e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmake/config-ix.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ set(COMPILER_RT_SUPPORTED_ARCH)
125125
# platform. We use the results of these tests to build only the various target
126126
# runtime libraries supported by our current compilers cross-compiling
127127
# abilities.
128-
set(SIMPLE_SOURCE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/simple.cc)
128+
set(SIMPLE_SOURCE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/simple.c)
129129
file(WRITE ${SIMPLE_SOURCE} "#include <stdlib.h>\n#include <stdio.h>\nint main() { printf(\"hello, world\"); }\n")
130130

131131
# Detect whether the current target platform is 32-bit or 64-bit, and setup

0 commit comments

Comments
 (0)