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

Zachary Turner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 16 16:17:11 PST 2016


zturner 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")
+if(MSVC)
+  # Only include coverage options supported for Windows.
----------------
Technically we don't support MSVC, only clang-cl.  So I would change this to `if (CLANG_CL)`.


================
Comment at: lib/Fuzzer/test/CMakeLists.txt:37
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
+else()
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zi")
----------------
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)`


Repository:
  rL LLVM

https://reviews.llvm.org/D27868





More information about the llvm-commits mailing list