aboutsummaryrefslogtreecommitdiff
path: root/cmake/config-ix.cmake
diff options
context:
space:
mode:
authorPetr Hosek <phosek@chromium.org>2018-05-22 01:01:56 +0000
committerPetr Hosek <phosek@chromium.org>2018-05-22 01:01:56 +0000
commite3c8c25f305b6013e047407818730acd83f9b3b6 (patch)
treee8b639ebbc2646e01d58de4effa70a4162f87daa /cmake/config-ix.cmake
parent4f8ac50ae47ddaac5ed5a1227744f4fd29a49976 (diff)
[CMake] Use a different source depending on C++ support
When using system C++ library, assume we have a working C++ compiler and try to compile a complete C++ program. When using in tree C++ library, only check the C compiler since the C++ library likely won't have been built yet at time of running the check. Differential Revision: https://reviews.llvm.org/D47169 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@332924 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake/config-ix.cmake')
-rw-r--r--cmake/config-ix.cmake7
1 files changed, 0 insertions, 7 deletions
diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake
index ee387dc22..8271a9686 100644
--- a/cmake/config-ix.cmake
+++ b/cmake/config-ix.cmake
@@ -121,13 +121,6 @@ endif()
# List of all architectures we can target.
set(COMPILER_RT_SUPPORTED_ARCH)
-# Try to compile a very simple source file to ensure we can target the given
-# 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)
-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
# the correct commandline flags needed to attempt to target 32-bit and 64-bit.
if (NOT CMAKE_SIZEOF_VOID_P EQUAL 4 AND