Index: gni/v8.gni |
diff --git a/gni/v8.gni b/gni/v8.gni |
index ae26521a6a98fadad77aadc422689fff9cd27141..24f65679a4731518b729d8d4ab1f9767e68108c9 100644 |
--- a/gni/v8.gni |
+++ b/gni/v8.gni |
@@ -3,6 +3,7 @@ |
# found in the LICENSE file. |
import("//build/config/v8_target_cpu.gni") |
+import("//build/config/sanitizers/sanitizers.gni") |
declare_args() { |
# Turns on compiler optimizations in V8 in Debug build. |
@@ -39,7 +40,14 @@ if (is_debug && !v8_optimized_debug) { |
add_configs += [ "//build/config/compiler:no_optimize" ] |
} else { |
remove_configs += [ "//build/config/compiler:default_optimization" ] |
- add_configs += [ "//build/config/compiler:optimize_max" ] |
+ |
+ # TODO(crbug.com/621335) Rework this so that we don't have the confusion |
+ # between "optimize_speed" and "optimize_max". |
+ if (is_posix && !is_android && !is_nacl && !using_sanitizer) { |
+ add_configs += [ "//build/config/compiler:optimize_speed" ] |
+ } else { |
+ add_configs += [ "//build/config/compiler:optimize_max" ] |
+ } |
} |
# All templates should be kept in sync. |