Index: build/config/compiler/BUILD.gn |
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn |
index c86203c5d370ce3f3bd6127d7c98f0acddab1964..a2f8b130e88f5b2a3db974d1229c5c1f0e87c619 100644 |
--- a/build/config/compiler/BUILD.gn |
+++ b/build/config/compiler/BUILD.gn |
@@ -720,7 +720,7 @@ config("optimize") { |
if (is_win) { |
# Favor size over speed, /O1 must be before the common flags. The GYP |
# build also specifies /Os and /GF but these are implied by /O1. |
- cflags = [ "/O1" ] + common_optimize_on_cflags + [ "/Oi" ] |
+ cflags = [ "/O2" ] + common_optimize_on_cflags + [ "/Oi" ] |
} else if (is_android) { |
cflags = [ "-Os" ] + common_optimize_on_cflags # Favor size over speed. |
} else { |
@@ -733,9 +733,9 @@ config("optimize") { |
config("no_optimize") { |
if (is_win) { |
cflags = [ |
- "/Od", # Disable optimization. |
+ "/O2", # Do some optimizations. |
+ "/Oy-", # Disable omitting frame pointers, must be after /O2. |
"/Ob0", # Disable all inlining (on by default). |
- "/RTC1", # Runtime checks for stack frame and uninitialized variables. |
] |
} else if (is_android) { |
# On Android we kind of optimize some things that don't affect debugging |