[PATCH] D66682: Fix stack_trace_compressor builds for Clang < 6.0

Mitch Phillips via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 23 16:14:38 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL369823: Fix stack_trace_compressor builds for Clang < 6.0 (authored by hctim, committed by ).
Herald added a subscriber: delcypher.

Changed prior to commit:
  https://reviews.llvm.org/D66682?vs=216943&id=216975#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66682/new/

https://reviews.llvm.org/D66682

Files:
  compiler-rt/trunk/lib/gwp_asan/CMakeLists.txt


Index: compiler-rt/trunk/lib/gwp_asan/CMakeLists.txt
===================================================================
--- compiler-rt/trunk/lib/gwp_asan/CMakeLists.txt
+++ compiler-rt/trunk/lib/gwp_asan/CMakeLists.txt
@@ -99,9 +99,15 @@
       ADDITIONAL_HEADERS ${GWP_ASAN_BACKTRACE_HEADERS}
       CFLAGS ${GWP_ASAN_CFLAGS} ${SANITIZER_COMMON_CFLAGS})
 
-  # Build the stack trace compressor fuzzer.
-  if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" AND
-      COMPILER_RT_BUILD_LIBFUZZER)
+  # Build the stack trace compressor fuzzer. Note that clang versions 4.* did
+  # not have -fsanitize=fuzzer, and Clang versions 5.* didn't have
+  # -fsanitize=fuzzer-no-link. In general, the way we build fuzz targets in LLVM
+  # core is to link it against a dummy main when DLLVM_USE_SANITIZE_COVERAGE
+  # isn't specified. Instead, here we only build fuzz targets if clang version
+  # is >= 6.0.
+  if (COMPILER_RT_BUILD_LIBFUZZER AND
+      "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" AND
+      CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 6.0)
     add_executable(stack_trace_compressor_fuzzer
         stack_trace_compressor_fuzzer.cpp
         ${GWP_ASAN_SOURCES}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66682.216975.patch
Type: text/x-patch
Size: 1176 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190823/83ad467d/attachment.bin>


More information about the llvm-commits mailing list