diff options
author | Jonas Hahnfeld <hahnjo@hahnjo.de> | 2018-06-17 09:51:33 +0000 |
---|---|---|
committer | Jonas Hahnfeld <hahnjo@hahnjo.de> | 2018-06-17 09:51:33 +0000 |
commit | 446483ac09a5d94b851e069f870122bd50d2f9c3 (patch) | |
tree | c42d8683e5cb1ffa3a0426fb5604b150296a514a /cmake/config-ix.cmake | |
parent | 8cebffa37e158e8f72331fcac763de065d2fa9d8 (diff) |
Revert "[CMake] Use a different source depending on C++ support"
This reverts commit r332924 and followup r332936 silencing a warning.
The change breaks the build on x86 if there is no 32-bit version of the
C++ libraries, see discussion in https://reviews.llvm.org/D47169.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@334903 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake/config-ix.cmake')
-rw-r--r-- | cmake/config-ix.cmake | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake index d7e830f8d..e6b775d59 100644 --- a/cmake/config-ix.cmake +++ b/cmake/config-ix.cmake @@ -123,6 +123,13 @@ 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 |