[PATCH] D20558: [LibFuzzer] Start cleaning up the CMakeLists.txt files.

Mike Aizatsky via llvm-commits llvm-commits at lists.llvm.org
Tue May 24 16:18:54 PDT 2016


aizatsky added inline comments.

================
Comment at: lib/Fuzzer/test/CMakeLists.txt:35
@@ +34,3 @@
+    # FIXME: Use of XX here is to avoid CMP0054
+    if (NOT ("XX${flag}" MATCHES "XX-O[0123s]"))
+      set(new_flags "${new_flags} ${flag}")
----------------
is -O always present? Do we want to always have "-O0" or do we want to rely on default level? 

================
Comment at: lib/Fuzzer/test/CMakeLists.txt:44
@@ -6,1 +43,3 @@
+
+set(SANITZE_COVERAGE_FLAGS "-fsanitize-coverage=edge,indirect-calls")
 
----------------
typo: SANITIZE

================
Comment at: lib/Fuzzer/test/trace-bb/CMakeLists.txt:2
@@ -1,4 +1,3 @@
 # These tests are not instrumented with coverage.
-
-set(CMAKE_CXX_FLAGS_RELEASE
-  "${LIBFUZZER_FLAGS_BASE} -fsanitize-coverage=edge,trace-bb")
+# FIXME: ^^^^ that comment looks utterly WRONG!
+set(TEST_SANITIZE_FLAGS "-fsanitize-coverage=edge,trace-bb")
----------------
let's remove it then.

================
Comment at: lib/Fuzzer/test/trace-pc/CMakeLists.txt:2
@@ -1,2 +1,3 @@
 # These tests are not instrumented with coverage.
+# FIXME: ^^^^ that comment looks utterly WRONG!
 
----------------
Same. Let's remove it.

================
Comment at: lib/Fuzzer/test/ubsan/CMakeLists.txt:3
@@ -2,3 +2,3 @@
 
-set(CMAKE_CXX_FLAGS_RELEASE
-  "${LIBFUZZER_FLAGS_BASE} -O0 -fsanitize=undefined -fno-sanitize-recover=all")
+# FIXME: Where are the coverage flags supposed to come from?
+set(TEST_SANITIZE_FLAGS
----------------
I guess it is HandleLLVMOptions in this case.


http://reviews.llvm.org/D20558





More information about the llvm-commits mailing list