Commit f7173473 authored by Jonathan Metzman's avatar Jonathan Metzman Committed by Commit Bot

Revert "[libFuzzer][Windows] Enable optimize_for_fuzzing"

This reverts commit 01602d56.

Reason for revert: /O1 is not the clang-cl equivalent of -O1 

Original change's description:
> [libFuzzer][Windows] Enable optimize_for_fuzzing
> 
> Bug: 890639
> Change-Id: Icb2be76982816119a30925fa92121445b5ca5141
> Reviewed-on: https://chromium-review.googlesource.com/c/1253023
> Reviewed-by: Max Moroz <mmoroz@chromium.org>
> Reviewed-by: Scott Graham <scottmg@chromium.org>
> Commit-Queue: Jonathan Metzman <metzman@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#596757}

TBR=thakis@chromium.org,scottmg@chromium.org,mmoroz@chromium.org,metzman@chromium.org

Change-Id: Ic407400440a3e6c58940b77708ab5334736242bb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 890639
Reviewed-on: https://chromium-review.googlesource.com/c/1264680Reviewed-by: default avatarJonathan Metzman <metzman@chromium.org>
Commit-Queue: Jonathan Metzman <metzman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#597184}
parent d9f2d67e
......@@ -2028,11 +2028,7 @@ config("optimize_max") {
if (is_win) {
# Favor speed over size, /O2 must be before the common flags. The GYP
# build also specifies /Ot, /Oi, and /GF, but these are implied by /O2.
if (optimize_for_fuzzing) {
cflags = [ "/O1" ] + common_optimize_on_cflags
} else {
cflags = [ "/O2" ] + common_optimize_on_cflags
}
cflags = [ "/O2" ] + common_optimize_on_cflags
if (is_official_build) {
if (!is_clang) {
......@@ -2079,11 +2075,7 @@ config("optimize_speed") {
if (is_win) {
# Favor speed over size, /O2 must be before the common flags. The GYP
# build also specifies /Ot, /Oi, and /GF, but these are implied by /O2.
if (optimize_for_fuzzing) {
cflags = [ "/O1" ] + common_optimize_on_cflags
} else {
cflags = [ "/O2" ] + common_optimize_on_cflags
}
cflags = [ "/O2" ] + common_optimize_on_cflags
# TODO(thakis): Remove is_clang here, https://crbug.com/598772
if (is_official_build && !is_clang) {
......@@ -2106,11 +2098,7 @@ config("optimize_speed") {
}
config("optimize_fuzzing") {
if (is_win) {
cflags = [ "/O1" ] + common_optimize_on_cflags
} else {
cflags = [ "-O1" ] + common_optimize_on_cflags
}
cflags = [ "-O1" ] + common_optimize_on_cflags
ldflags = common_optimize_on_ldflags
visibility = [ ":default_optimization" ]
}
......@@ -2125,6 +2113,8 @@ config("default_optimization") {
} else if (is_debug) {
configs = [ ":no_optimize" ]
} else if (optimize_for_fuzzing) {
assert(!is_win, "Fuzzing optimize level not supported on Windows")
# Coverage build is quite slow. Using "optimize_for_fuzzing" makes it even
# slower as it uses "-O1" instead of "-O3". Prevent that from happening.
assert(!use_clang_coverage,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment