forked from OSchip/llvm-project
[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 llvm-svn: 311912
This commit is contained in:
parent
16a05f2dfe
commit
dacfd66dfd
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue