[PATCH] D28632: [libFuzzer] Remove optimization flags for tests on Windows.

Marcos Pividori via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 21 17:38:54 PST 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL292737: [libFuzzer] Remove optimization flags for tests. (authored by mpividori).

Changed prior to commit:
  https://reviews.llvm.org/D28632?vs=84311&id=85257#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D28632

Files:
  llvm/trunk/lib/Fuzzer/test/CMakeLists.txt


Index: llvm/trunk/lib/Fuzzer/test/CMakeLists.txt
===================================================================
--- llvm/trunk/lib/Fuzzer/test/CMakeLists.txt
+++ llvm/trunk/lib/Fuzzer/test/CMakeLists.txt
@@ -11,17 +11,7 @@
   LIBFUZZER_FLAGS_BASE
   )
 foreach (VARNAME ${variables_to_filter})
-  string(REPLACE " " ";" BUILD_FLAGS_AS_LIST "${${VARNAME}}")
-  set(new_flags "")
-  foreach (flag ${BUILD_FLAGS_AS_LIST})
-    # NOTE: Use of XX here is to avoid a CMake warning due to CMP0054
-    if (NOT ("XX${flag}" MATCHES "XX-O[0123s]"))
-      set(new_flags "${new_flags} ${flag}")
-    else()
-      set(new_flags "${new_flags} -O0")
-    endif()
-  endforeach()
-  set(${VARNAME} "${new_flags}")
+  string(REGEX REPLACE "([-/]O)[123s]" "\\10" ${VARNAME} "${${VARNAME}}")
 endforeach()
 
 # Enable the coverage instrumentation (it is disabled for the Fuzzer lib).


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28632.85257.patch
Type: text/x-patch
Size: 873 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170122/d31daf3a/attachment.bin>


More information about the llvm-commits mailing list