Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Unified Diff: BUILD.gn

Issue 2024833002: [gn] Rework debug configurations (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | build_overrides/v8.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: BUILD.gn
diff --git a/BUILD.gn b/BUILD.gn
index 7c782e651e094be89cdab2bbccde46a1861ebcb4..397e45d32308896bfa29a8138793db371238a71b 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -4,6 +4,7 @@
import("//build/config/android/config.gni")
import("//build/config/arm.gni")
+import("//build/config/dcheck_always_on.gni")
import("//build/config/mips.gni")
import("//build/config/sanitizers/sanitizers.gni")
@@ -40,6 +41,9 @@ declare_args() {
# add a dependency on the ICU library.
v8_enable_i18n_support = true
+ # Enable slow dchecks.
+ v8_enable_slow_dchecks = false
+
# Interpreted regexp engine exists as platform-independent alternative
# based where the regular expression is compiled to a bytecode.
v8_interpreted_regexp = false
@@ -47,6 +51,9 @@ declare_args() {
# Sets -dOBJECT_PRINT.
v8_object_print = false
+ # Turns on compiler optimizations in V8 in Debug build.
+ v8_optimized_debug = true
+
# With post mortem support enabled, metadata is embedded into libv8 that
# describes various parameters of the VM for use by debuggers. See
# tools/gen-postmortem-metadata.py for details.
@@ -287,9 +294,11 @@ config("toolchain") {
"DEBUG",
"TRACE_MAPS",
]
- if (!v8_optimized_debug) {
+ if (v8_enable_slow_dchecks) {
defines += [ "ENABLE_SLOW_DCHECKS" ]
}
+ } else if (dcheck_always_on) {
+ defines += [ "DEBUG" ]
}
}
@@ -308,7 +317,12 @@ template("v8_source_set") {
":toolchain",
]
- if (!is_debug || v8_optimized_debug) {
+ # TODO(machenbach): This config doesn't affect executables and components.
+ # It should be moved to a common place.
+ if (is_debug && !v8_optimized_debug) {
+ configs -= [ "//build/config/compiler:default_optimization" ]
+ configs += [ "//build/config/compiler:no_optimize" ]
+ } else {
configs -= [ "//build/config/compiler:default_optimization" ]
configs += [ "//build/config/compiler:optimize_max" ]
}
« no previous file with comments | « no previous file | build_overrides/v8.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698