[compiler-rt] r331003 - [CMake] Make simple source used for CMake checks a C file

Petr Hosek via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 26 16:35:13 PDT 2018


Author: phosek
Date: Thu Apr 26 16:35:13 2018
New Revision: 331003

URL: http://llvm.org/viewvc/llvm-project?rev=331003&view=rev
Log:
[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

Modified:
    compiler-rt/trunk/cmake/config-ix.cmake

Modified: compiler-rt/trunk/cmake/config-ix.cmake
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/config-ix.cmake?rev=331003&r1=331002&r2=331003&view=diff
==============================================================================
--- compiler-rt/trunk/cmake/config-ix.cmake (original)
+++ compiler-rt/trunk/cmake/config-ix.cmake Thu Apr 26 16:35:13 2018
@@ -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




More information about the llvm-commits mailing list