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}
This commit is contained in:
thakis 2016-04-12 06:47:44 -07:00 committed by Commit bot
parent 72b00cab5c
commit 61c6cbb9e1

View File

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