diff options
author | Petr Hosek <phosek@chromium.org> | 2018-07-16 18:48:20 +0000 |
---|---|---|
committer | Petr Hosek <phosek@chromium.org> | 2018-07-16 18:48:20 +0000 |
commit | 1a045aa98408e39404f4186a3fb3d18bdc750522 (patch) | |
tree | 72a72b181a75453c63dc117836a2d63261c9d7e4 /lib | |
parent | 5bbe2af12238b65ac38bb1530c85fb6660c4ef9e (diff) |
[CMake] Use cxx-headers as a depedency for C++ headers
We no longer pass CLANG_DEFAULT_CXX_STDLIB to the runtimes build
as it was causing issues so we can no longer use this variable. We
instead use cxx-headers as a dependency whenever this is available
since both XRay and libFuzzer are built as static libraries so this
is sufficient.
Differential Revision: https://reviews.llvm.org/D49346
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337199 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/fuzzer/CMakeLists.txt | 4 | ||||
-rw-r--r-- | lib/xray/CMakeLists.txt | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/fuzzer/CMakeLists.txt b/lib/fuzzer/CMakeLists.txt index bb32740a1..679318e46 100644 --- a/lib/fuzzer/CMakeLists.txt +++ b/lib/fuzzer/CMakeLists.txt @@ -59,8 +59,8 @@ if(OS_NAME MATCHES "Linux|Fuchsia" AND COMPILER_RT_LIBCXX_PATH) list(APPEND LIBFUZZER_CFLAGS -nostdinc++ -D_LIBCPP_ABI_VERSION=Fuzzer) # Remove -stdlib= which is unused when passing -nostdinc++. string(REGEX REPLACE "-stdlib=[a-zA-Z+]*" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) -elseif(CLANG_DEFAULT_CXX_STDLIB STREQUAL "libc++" AND (TARGET cxx OR HAVE_LIBCXX)) - set(LIBFUZZER_DEPS cxx) +elseif(TARGET cxx-headers OR HAVE_LIBCXX) + set(LIBFUZZER_DEPS cxx-headers) endif() append_list_if(COMPILER_RT_HAS_OMIT_FRAME_POINTER_FLAG -fno-omit-frame-pointer LIBFUZZER_CFLAGS) diff --git a/lib/xray/CMakeLists.txt b/lib/xray/CMakeLists.txt index fe3f4ba1d..8e18f5565 100644 --- a/lib/xray/CMakeLists.txt +++ b/lib/xray/CMakeLists.txt @@ -133,8 +133,8 @@ set(XRAY_COMMON_RUNTIME_OBJECT_LIBS RTSanitizerCommon RTSanitizerCommonLibc) -if (CLANG_DEFAULT_CXX_STDLIB STREQUAL "libc++" AND (TARGET cxx OR HAVE_LIBCXX)) - set(XRAY_DEPS cxx) +if (TARGET cxx-headers OR HAVE_LIBCXX) + set(XRAY_DEPS cxx-headers) endif() if (APPLE) |