[PATCH] D48261: [Fuzzer] Set an explicit libc++ dependency when needed
Petr Hosek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 18 01:06:34 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rCRT334928: [Fuzzer] Set an explicit libc++ dependency when needed (authored by phosek, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D48261?vs=151631&id=151664#toc
Repository:
rL LLVM
https://reviews.llvm.org/D48261
Files:
lib/fuzzer/CMakeLists.txt
Index: lib/fuzzer/CMakeLists.txt
===================================================================
--- lib/fuzzer/CMakeLists.txt
+++ lib/fuzzer/CMakeLists.txt
@@ -38,6 +38,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)
endif()
append_list_if(COMPILER_RT_HAS_OMIT_FRAME_POINTER_FLAG -fno-omit-frame-pointer LIBFUZZER_CFLAGS)
@@ -56,13 +58,15 @@
OS ${FUZZER_SUPPORTED_OS}
ARCHS ${FUZZER_SUPPORTED_ARCH}
SOURCES ${LIBFUZZER_SOURCES}
- CFLAGS ${LIBFUZZER_CFLAGS})
+ CFLAGS ${LIBFUZZER_CFLAGS}
+ DEPS ${LIBFUZZER_DEPS})
add_compiler_rt_object_libraries(RTfuzzer_main
OS ${FUZZER_SUPPORTED_OS}
ARCHS ${FUZZER_SUPPORTED_ARCH}
SOURCES FuzzerMain.cpp
- CFLAGS ${LIBFUZZER_CFLAGS})
+ CFLAGS ${LIBFUZZER_CFLAGS}
+ DEPS ${LIBFUZZER_DEPS})
add_compiler_rt_runtime(clang_rt.fuzzer
STATIC
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48261.151664.patch
Type: text/x-patch
Size: 1103 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180618/feba0611/attachment.bin>
More information about the llvm-commits
mailing list