Introduce a gyp variable to control whether or not slow dchecks are on
authorjochen <jochen@chromium.org>
Fri, 9 Jan 2015 16:25:36 +0000 (08:25 -0800)
committerCommit bot <commit-bot@chromium.org>
Fri, 9 Jan 2015 16:25:51 +0000 (16:25 +0000)
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}

Makefile
build/toolchain.gypi

index 8bdfd9f86a4b2bea1bf298f128a8d91a2057cdb0..6c2955126bdf3e99b9547336de388ac46bbd1fa4 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -90,6 +90,13 @@ endif
 ifeq ($(extrachecks), off)
   GYPFLAGS += -Ddcheck_always_on=0 -Dv8_enable_handle_zapping=0
 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
 ifeq ($(gdbjit), on)
   GYPFLAGS += -Dv8_enable_gdbjit=1
index ac10065601a0c1e426e69a2fcde7307cc8b9648c..8227fbf8e03e6808d2cf39b12a2b1aeb04cf0a90 100644 (file)
             'LinkIncremental': '2',
           },
         },
+        'variables': {
+          'v8_enable_slow_dchecks%': 1,
+        },
         'conditions': [
           ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" or \
             OS=="qnx"', {
                'GCC_OPTIMIZATION_LEVEL': '0',  # -O0
             },
           }],
-        ],
-        'defines': [
-          'ENABLE_SLOW_DCHECKS',
+          ['v8_enable_slow_dchecks==1', {
+            'defines': [
+              'ENABLE_SLOW_DCHECKS',
+            ],
+          }],
         ],
       },  # DebugBase0
       # Abstract configuration for v8_optimized_debug == 1.
             'LinkIncremental': '2',
           },
         },
-        'defines': [
-          'ENABLE_SLOW_DCHECKS',
-        ],
+        'variables': {
+          'v8_enable_slow_dchecks%': 1,
+        },
         'conditions': [
           ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" or \
             OS=="qnx"', {
                'GCC_STRICT_ALIASING': 'YES',
             },
           }],
+          ['v8_enable_slow_dchecks==1', {
+            'defines': [
+              'ENABLE_SLOW_DCHECKS',
+            ],
+          }],
         ],
       },  # DebugBase1
       # Abstract configuration for v8_optimized_debug == 2.
             'EnableCOMDATFolding': '2',
           },
         },
+        'variables': {
+          'v8_enable_slow_dchecks%': 0,
+        },
         'conditions': [
           ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" or \
             OS=="qnx"', {
               'GCC_STRICT_ALIASING': 'YES',
             },
           }],
+          ['v8_enable_slow_dchecks==1', {
+            'defines': [
+              'ENABLE_SLOW_DCHECKS',
+            ],
+          }],
         ],
       },  # DebugBase2
       # Common settings for the Debug configuration.
         ],
       },  # Debug
       'Release': {
+        'variables': {
+          'v8_enable_slow_dchecks%': 0,
+        },
         'conditions': [
           ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', {
             'cflags!': [
               },
             },
           }],  # OS=="win"
+          ['v8_enable_slow_dchecks==1', {
+            'defines': [
+              'ENABLE_SLOW_DCHECKS',
+            ],
+          }],
         ],  # conditions
       },  # Release
     },  # configurations