[PATCH] D27868: [libFuzzer] Diff 23 - Properly use compiler options supported on Windows.

Marcos Pividori via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 16 16:24:54 PST 2016

mpividori added inline comments.

Comment at: lib/Fuzzer/test/CMakeLists.txt:28
 # Enable the coverage instrumentation (it is disabled for the Fuzzer lib).
-set(CMAKE_CXX_FLAGS "${LIBFUZZER_FLAGS_BASE} -fsanitize-coverage=trace-pc-guard,indirect-calls,trace-cmp,trace-div,trace-gep -g")
+  # Only include coverage options supported for Windows.
zturner wrote:
> Technically we don't support MSVC, only clang-cl.  So I would change this to `if (CLANG_CL)`.
@zturner, Yes, the only compiler in windows for this code is clang. I can use a more explicit flag.

Comment at: lib/Fuzzer/test/CMakeLists.txt:30
+  # Only include coverage options supported for Windows.
+  set(CMAKE_CXX_FLAGS "${LIBFUZZER_FLAGS_BASE} -fsanitize-coverage=edge")
kcc wrote:
> Nope. =edge should not be used any more with libFuzzer. 
> I am going to delete the libFuzzer code that supports it pretty soon. 
> What's wrong with trace-pc-guard,trace-cmp on windows? 
@kcc Ok. I couldn't get that information from the documentation. 
Trace-* options doesn't work on windows. I can try to fix them, I would need some time.

Comment at: lib/Fuzzer/test/CMakeLists.txt:37
kcc wrote:
> zturner wrote:
> > kcc wrote:
> > > hmmm. What is the 'else' compiler? 
> > clang-cl I imagine, but /Z7 is more correct than /Zi.  To make the else clear, you could say `elseif(CLANG_CL)`
> Does clang-cl not support -g? 
Yes, clang-cl doesn't support `-g`.



More information about the llvm-commits mailing list