forked from OSchip/llvm-project
[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 llvm-svn: 337199
This commit is contained in:
parent
c370d7b33d
commit
b05be5f4b4
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue