Commit 61c6cbb9 authored by thakis's avatar thakis Committed by Commit bot

Port v8_optimized_debug to gn.

Makes browser_tests --gtest_filter=CrSettingsBrowserTest.CrSettingsTest
complete in a little over 8 seconds instead of timing out after 45s
on my box.  Without this patch, the test is much slower in gn builds
than in gyp builds.

v8/ part, goes with https://codereview.chromium.org/1880693003

BUG=chromium:586511
LOG=n

Review URL: https://codereview.chromium.org/1882453002

Cr-Commit-Position: refs/heads/master@{#35415}
parent 72b00cab
...@@ -246,8 +246,11 @@ config("toolchain") { ...@@ -246,8 +246,11 @@ config("toolchain") {
"OBJECT_PRINT", "OBJECT_PRINT",
"VERIFY_HEAP", "VERIFY_HEAP",
"DEBUG", "DEBUG",
"OPTIMIZED_DEBUG", "TRACE_MAPS",
] ]
if (!v8_optimized_debug) {
defines += [ "ENABLE_SLOW_DCHECKS" ]
}
} }
} }
...@@ -583,6 +586,10 @@ source_set("v8_nosnapshot") { ...@@ -583,6 +586,10 @@ source_set("v8_nosnapshot") {
":features", ":features",
":toolchain", ":toolchain",
] ]
if (!is_debug || v8_optimized_debug) {
configs -= [ "//build/config/compiler:default_optimization" ]
configs += [ "//build/config/compiler:optimize_max" ]
}
} }
source_set("v8_snapshot") { source_set("v8_snapshot") {
...@@ -621,6 +628,10 @@ source_set("v8_snapshot") { ...@@ -621,6 +628,10 @@ source_set("v8_snapshot") {
":features", ":features",
":toolchain", ":toolchain",
] ]
if (!is_debug || v8_optimized_debug) {
configs -= [ "//build/config/compiler:default_optimization" ]
configs += [ "//build/config/compiler:optimize_max" ]
}
} }
if (v8_use_external_startup_data) { if (v8_use_external_startup_data) {
...@@ -651,6 +662,10 @@ if (v8_use_external_startup_data) { ...@@ -651,6 +662,10 @@ if (v8_use_external_startup_data) {
":features", ":features",
":toolchain", ":toolchain",
] ]
if (!is_debug || v8_optimized_debug) {
configs -= [ "//build/config/compiler:default_optimization" ]
configs += [ "//build/config/compiler:optimize_max" ]
}
} }
} }
...@@ -1734,7 +1749,7 @@ source_set("v8_base") { ...@@ -1734,7 +1749,7 @@ source_set("v8_base") {
":toolchain", ":toolchain",
] ]
if (!is_debug) { if (!is_debug || v8_optimized_debug) {
configs -= [ "//build/config/compiler:default_optimization" ] configs -= [ "//build/config/compiler:default_optimization" ]
configs += [ "//build/config/compiler:optimize_max" ] configs += [ "//build/config/compiler:optimize_max" ]
} }
...@@ -1836,7 +1851,7 @@ source_set("v8_libbase") { ...@@ -1836,7 +1851,7 @@ source_set("v8_libbase") {
":toolchain", ":toolchain",
] ]
if (!is_debug) { if (!is_debug || v8_optimized_debug) {
configs -= [ "//build/config/compiler:default_optimization" ] configs -= [ "//build/config/compiler:default_optimization" ]
configs += [ "//build/config/compiler:optimize_max" ] configs += [ "//build/config/compiler:optimize_max" ]
} }
...@@ -1907,7 +1922,7 @@ source_set("v8_libplatform") { ...@@ -1907,7 +1922,7 @@ source_set("v8_libplatform") {
":toolchain", ":toolchain",
] ]
if (!is_debug) { if (!is_debug || v8_optimized_debug) {
configs -= [ "//build/config/compiler:default_optimization" ] configs -= [ "//build/config/compiler:default_optimization" ]
configs += [ "//build/config/compiler:optimize_max" ] configs += [ "//build/config/compiler:optimize_max" ]
} }
......
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