[compiler-rt] r311912 - [libFuzzer] Fix libFuzzer flag propagation for standalone builds.
George Karpenkov via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 28 12:44:20 PDT 2017
Author: george.karpenkov
Date: Mon Aug 28 12:44:19 2017
New Revision: 311912
URL: http://llvm.org/viewvc/llvm-project?rev=311912&view=rev
Log:
[libFuzzer] Fix libFuzzer flag propagation for standalone builds.
Under the previous configurations, flags from SANITIZER_COMMON were not
propagated for standalone builds.
Differential Revision: https://reviews.llvm.org/D37225
Modified:
compiler-rt/trunk/lib/fuzzer/CMakeLists.txt
Modified: compiler-rt/trunk/lib/fuzzer/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/fuzzer/CMakeLists.txt?rev=311912&r1=311911&r2=311912&view=diff
==============================================================================
--- compiler-rt/trunk/lib/fuzzer/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/fuzzer/CMakeLists.txt Mon Aug 28 12:44:19 2017
@@ -30,11 +30,14 @@ CHECK_CXX_SOURCE_COMPILES("
}
" HAS_THREAD_LOCAL)
+set(LIBFUZZER_CFLAGS ${SANITIZER_COMMON_CFLAGS})
+
if (CMAKE_CXX_FLAGS MATCHES "fsanitize-coverage")
- set(LIBFUZZER_CFLAGS -fno-sanitize-coverage=trace-pc-guard,edge,trace-cmp,indirect-calls,8bit-counters)
+ list(APPEND LIBFUZZER_CFLAGS -fno-sanitize-coverage=trace-pc-guard,edge,trace-cmp,indirect-calls,8bit-counters)
endif()
+
if(NOT HAS_THREAD_LOCAL)
- set(LIBFUZZER_CFLAGS "${LIBFUZZER_CFLAGS} -Dthread_local=__thread")
+ list(APPEND LIBFUZZER_CFLAGS -Dthread_local=__thread)
endif()
if(APPLE)
More information about the llvm-commits
mailing list