[PATCH] D49346: [CMake] Use cxx-headers as a depedency for C++ headers

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 16 11:53:35 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL337199: [CMake] Use cxx-headers as a depedency for C++ headers (authored by phosek, committed by ).
Herald added a subscriber: delcypher.

Changed prior to commit:
  https://reviews.llvm.org/D49346?vs=155578&id=155732#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D49346

Files:
  compiler-rt/trunk/lib/fuzzer/CMakeLists.txt
  compiler-rt/trunk/lib/xray/CMakeLists.txt


Index: compiler-rt/trunk/lib/fuzzer/CMakeLists.txt
===================================================================
--- compiler-rt/trunk/lib/fuzzer/CMakeLists.txt
+++ compiler-rt/trunk/lib/fuzzer/CMakeLists.txt
@@ -59,8 +59,8 @@
   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)
Index: compiler-rt/trunk/lib/xray/CMakeLists.txt
===================================================================
--- compiler-rt/trunk/lib/xray/CMakeLists.txt
+++ compiler-rt/trunk/lib/xray/CMakeLists.txt
@@ -133,8 +133,8 @@
     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)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49346.155732.patch
Type: text/x-patch
Size: 1230 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180716/ae79af83/attachment.bin>


More information about the llvm-commits mailing list