diff options
author | Pirama Arumuga Nainar <pirama@google.com> | 2019-01-24 10:59:23 -0800 |
---|---|---|
committer | Yi Kong <yikong@google.com> | 2019-03-02 00:16:14 +0000 |
commit | 0f277df509881d75b7701e49a90ec4f2e25cb062 (patch) | |
tree | 9979d53d68feed14db93f232a607ccfbdfa59cec | |
parent | b9d196cb9b489410931ed8e0ec3d8baadd16a40a (diff) | |
download | compiler-rt-0f277df509881d75b7701e49a90ec4f2e25cb062.tar.gz |
Revert "Add option to disable linking of libcxx into fuzzer"
Bug: http://b/123257989
This reverts commit 70375fadea305578c21ccafd51af55032964788e. This
change has been unnecessary ever since r334144, where linking of libcxx
into libfuzzer was restricted to Linux and Fuchsia.
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | lib/fuzzer/CMakeLists.txt | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ea5820baa..3b2b5145f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,8 +39,6 @@ option(COMPILER_RT_BUILD_PROFILE "Build profile runtime" ON) mark_as_advanced(COMPILER_RT_BUILD_PROFILE) option(COMPILER_RT_BUILD_XRAY_NO_PREINIT "Build xray with no preinit patching" OFF) mark_as_advanced(COMPILER_RT_BUILD_XRAY_NO_PREINIT) -option(COMPILER_RT_FUZZER_LINK_LIBCXX "Link a copy of libcxx into libfuzzer" ON) -mark_as_advanced(COMPILER_RT_FUZZER_LINK_LIBCXX) set(COMPILER_RT_ASAN_SHADOW_SCALE "" CACHE STRING "Override the shadow scale to be used in ASan runtime") diff --git a/lib/fuzzer/CMakeLists.txt b/lib/fuzzer/CMakeLists.txt index 2405fbf3d..c81411339 100644 --- a/lib/fuzzer/CMakeLists.txt +++ b/lib/fuzzer/CMakeLists.txt @@ -55,7 +55,7 @@ CHECK_CXX_SOURCE_COMPILES(" set(LIBFUZZER_CFLAGS ${SANITIZER_COMMON_CFLAGS}) -if(OS_NAME MATCHES "Linux|Fuchsia" AND COMPILER_RT_LIBCXX_PATH AND COMPILER_RT_FUZZER_LINK_LIBCXX) +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}) @@ -113,7 +113,7 @@ add_compiler_rt_runtime(clang_rt.fuzzer_no_main CFLAGS ${LIBFUZZER_CFLAGS} PARENT_TARGET fuzzer) -if(OS_NAME MATCHES "Linux|Fuchsia" AND COMPILER_RT_LIBCXX_PATH AND COMPILER_RT_FUZZER_LINK_LIBCXX) +if(OS_NAME MATCHES "Linux|Fuchsia" AND COMPILER_RT_LIBCXX_PATH) macro(partially_link_libcxx name dir arch) set(cxx_${arch}_merge_dir "${CMAKE_CURRENT_BINARY_DIR}/cxx_${arch}_merge.dir") file(MAKE_DIRECTORY ${cxx_${arch}_merge_dir}) |