[compiler-rt] r337033 - [CMake] Don't use CLANG_DEFAULT_* values
Petr Hosek via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 13 12:16:30 PDT 2018
Author: phosek
Date: Fri Jul 13 12:16:30 2018
New Revision: 337033
URL: http://llvm.org/viewvc/llvm-project?rev=337033&view=rev
Log:
[CMake] Don't use CLANG_DEFAULT_* values
These are not necessarily correct, just because Clang is configured
to use libc++ or compiler-rt as defaults doesn't mean that the host
compiler uses these as defaults as well. A more correct solution
would be to test the host compiler to check what the default actually
is as attempted in D46857.
Part of PR-38025.
Differential Revision: https://reviews.llvm.org/D49272
Modified:
compiler-rt/trunk/CMakeLists.txt
Modified: compiler-rt/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/CMakeLists.txt?rev=337033&r1=337032&r2=337033&view=diff
==============================================================================
--- compiler-rt/trunk/CMakeLists.txt (original)
+++ compiler-rt/trunk/CMakeLists.txt Fri Jul 13 12:16:30 2018
@@ -142,10 +142,7 @@ set(CXXABIS none default libstdc++ libc+
set_property(CACHE SANITIZER_CXX_ABI PROPERTY STRINGS ;${CXXABIS})
if (SANITIZER_CXX_ABI STREQUAL "default")
- if (CLANG_DEFAULT_CXX_STDLIB STREQUAL "libc++" AND (TARGET cxx OR HAVE_LIBCXX))
- set(SANITIZER_CXX_ABI_LIBNAME "libc++")
- set(SANITIZER_CXX_ABI_INTREE 1)
- elseif (APPLE)
+ if (APPLE)
set(SANITIZER_CXX_ABI_LIBNAME "libc++")
set(SANITIZER_CXX_ABI_SYSTEM 1)
elseif (FUCHSIA)
@@ -164,9 +161,7 @@ set(COMPILER_RT_RUNTIME "default" CACHE
"Compiler runtime to use.")
if (COMPILER_RT_RUNTIME STREQUAL "default")
- if (CLANG_DEFAULT_RTLIB STREQUAL "compiler-rt")
- set(COMPILER_RT_RUNTIME_LIBRARY "builtins")
- elseif (FUCHSIA)
+ if (FUCHSIA)
set(COMPILER_RT_RUNTIME_LIBRARY "builtins")
endif()
else()
More information about the llvm-commits
mailing list