[PATCH] D46152: [CMake] Make simple source used for CMake checks a C file
Petr Hosek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 26 16:29:31 PDT 2018
phosek created this revision.
phosek added reviewers: vitalybuka, mcgrathr, beanz.
Herald added subscribers: Sanitizers, llvm-commits, mgorny.
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.
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D46152
Files:
compiler-rt/cmake/config-ix.cmake
Index: compiler-rt/cmake/config-ix.cmake
===================================================================
--- compiler-rt/cmake/config-ix.cmake
+++ compiler-rt/cmake/config-ix.cmake
@@ -125,7 +125,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.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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46152.144235.patch
Type: text/x-patch
Size: 713 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180426/f27dd919/attachment.bin>
More information about the llvm-commits
mailing list