Commit 77e3e48e authored by jochen's avatar jochen Committed by Commit bot

Introduce a gyp variable to control whether or not slow dchecks are on

The default for the various debug modes doesn't change.

In a follow-up, OptDebug1 and OptDebug2 will be merged

R=machenbach@chromium.org
LOG=y
BUG=none

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

Cr-Commit-Position: refs/heads/master@{#26015}
parent b6c7e11c
...@@ -90,6 +90,13 @@ endif ...@@ -90,6 +90,13 @@ endif
ifeq ($(extrachecks), off) ifeq ($(extrachecks), off)
GYPFLAGS += -Ddcheck_always_on=0 -Dv8_enable_handle_zapping=0 GYPFLAGS += -Ddcheck_always_on=0 -Dv8_enable_handle_zapping=0
endif endif
# slowdchecks=on/off
ifeq ($(slowdchecks), on)
GYPFLAGS += -Dv8_enable_slow_dchecks=1
endif
ifeq ($(slowdchecks), off)
GYPFLAGS += -Dv8_enable_slow_dchecks=0
endif
# gdbjit=on/off # gdbjit=on/off
ifeq ($(gdbjit), on) ifeq ($(gdbjit), on)
GYPFLAGS += -Dv8_enable_gdbjit=1 GYPFLAGS += -Dv8_enable_gdbjit=1
......
...@@ -883,6 +883,9 @@ ...@@ -883,6 +883,9 @@
'LinkIncremental': '2', 'LinkIncremental': '2',
}, },
}, },
'variables': {
'v8_enable_slow_dchecks%': 1,
},
'conditions': [ 'conditions': [
['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" or \ ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" or \
OS=="qnx"', { OS=="qnx"', {
...@@ -902,10 +905,12 @@ ...@@ -902,10 +905,12 @@
'GCC_OPTIMIZATION_LEVEL': '0', # -O0 'GCC_OPTIMIZATION_LEVEL': '0', # -O0
}, },
}], }],
], ['v8_enable_slow_dchecks==1', {
'defines': [ 'defines': [
'ENABLE_SLOW_DCHECKS', 'ENABLE_SLOW_DCHECKS',
], ],
}],
],
}, # DebugBase0 }, # DebugBase0
# Abstract configuration for v8_optimized_debug == 1. # Abstract configuration for v8_optimized_debug == 1.
'DebugBase1': { 'DebugBase1': {
...@@ -930,9 +935,9 @@ ...@@ -930,9 +935,9 @@
'LinkIncremental': '2', 'LinkIncremental': '2',
}, },
}, },
'defines': [ 'variables': {
'ENABLE_SLOW_DCHECKS', 'v8_enable_slow_dchecks%': 1,
], },
'conditions': [ 'conditions': [
['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" or \ ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" or \
OS=="qnx"', { OS=="qnx"', {
...@@ -954,6 +959,11 @@ ...@@ -954,6 +959,11 @@
'GCC_STRICT_ALIASING': 'YES', 'GCC_STRICT_ALIASING': 'YES',
}, },
}], }],
['v8_enable_slow_dchecks==1', {
'defines': [
'ENABLE_SLOW_DCHECKS',
],
}],
], ],
}, # DebugBase1 }, # DebugBase1
# Abstract configuration for v8_optimized_debug == 2. # Abstract configuration for v8_optimized_debug == 2.
...@@ -981,6 +991,9 @@ ...@@ -981,6 +991,9 @@
'EnableCOMDATFolding': '2', 'EnableCOMDATFolding': '2',
}, },
}, },
'variables': {
'v8_enable_slow_dchecks%': 0,
},
'conditions': [ 'conditions': [
['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" or \ ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" or \
OS=="qnx"', { OS=="qnx"', {
...@@ -1010,6 +1023,11 @@ ...@@ -1010,6 +1023,11 @@
'GCC_STRICT_ALIASING': 'YES', 'GCC_STRICT_ALIASING': 'YES',
}, },
}], }],
['v8_enable_slow_dchecks==1', {
'defines': [
'ENABLE_SLOW_DCHECKS',
],
}],
], ],
}, # DebugBase2 }, # DebugBase2
# Common settings for the Debug configuration. # Common settings for the Debug configuration.
...@@ -1064,6 +1082,9 @@ ...@@ -1064,6 +1082,9 @@
], ],
}, # Debug }, # Debug
'Release': { 'Release': {
'variables': {
'v8_enable_slow_dchecks%': 0,
},
'conditions': [ 'conditions': [
['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', { ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', {
'cflags!': [ 'cflags!': [
...@@ -1130,6 +1151,11 @@ ...@@ -1130,6 +1151,11 @@
}, },
}, },
}], # OS=="win" }], # OS=="win"
['v8_enable_slow_dchecks==1', {
'defines': [
'ENABLE_SLOW_DCHECKS',
],
}],
], # conditions ], # conditions
}, # Release }, # Release
}, # configurations }, # configurations
......
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