1# Copyright 2013 the V8 project authors. All rights reserved.
2# Redistribution and use in source and binary forms, with or without
3# modification, are permitted provided that the following conditions are
4# met:
5#
6#     * Redistributions of source code must retain the above copyright
7#       notice, this list of conditions and the following disclaimer.
8#     * Redistributions in binary form must reproduce the above
9#       copyright notice, this list of conditions and the following
10#       disclaimer in the documentation and/or other materials provided
11#       with the distribution.
12#     * Neither the name of Google Inc. nor the names of its
13#       contributors may be used to endorse or promote products derived
14#       from this software without specific prior written permission.
15#
16# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
28# Compile time controlled V8 features.
29
30{
31  'variables': {
32    'v8_enable_disassembler%': 0,
33
34    'v8_enable_gdbjit%': 0,
35
36    'v8_enable_verify_csa%': 0,
37
38    'v8_object_print%': 0,
39
40    'v8_enable_verify_heap%': 0,
41
42    'v8_trace_maps%': 0,
43
44    # Enable the snapshot feature, for fast context creation.
45    # http://v8project.blogspot.com/2015/09/custom-startup-snapshots.html
46    'v8_use_snapshot%': 'true',
47
48    'v8_enable_verify_predictable%': 0,
49
50    # With post mortem support enabled, metadata is embedded into libv8 that
51    # describes various parameters of the VM for use by debuggers. See
52    # tools/gen-postmortem-metadata.py for details.
53    'v8_postmortem_support%': 'false',
54
55    # Interpreted regexp engine exists as platform-independent alternative
56    # based where the regular expression is compiled to a bytecode.
57    'v8_interpreted_regexp%': 0,
58
59    # Enable ECMAScript Internationalization API. Enabling this feature will
60    # add a dependency on the ICU library.
61    'v8_enable_i18n_support%': 1,
62
63    # Enable compiler warnings when using V8_DEPRECATED apis.
64    'v8_deprecation_warnings%': 0,
65
66    # Enable compiler warnings when using V8_DEPRECATE_SOON apis.
67    'v8_imminent_deprecation_warnings%': 0,
68
69    # Set to 1 to enable DCHECKs in release builds.
70    'dcheck_always_on%': 0,
71
72    # Enable/disable JavaScript API accessors.
73    'v8_js_accessors%': 0,
74  },
75  'target_defaults': {
76    'conditions': [
77      ['v8_enable_disassembler==1', {
78        'defines': ['ENABLE_DISASSEMBLER',],
79      }],
80      ['v8_enable_gdbjit==1', {
81        'defines': ['ENABLE_GDB_JIT_INTERFACE',],
82      }],
83      ['v8_enable_verify_csa==1', {
84        'defines': ['ENABLE_VERIFY_CSA',],
85      }],
86      ['v8_object_print==1', {
87        'defines': ['OBJECT_PRINT',],
88      }],
89      ['v8_enable_verify_heap==1', {
90        'defines': ['VERIFY_HEAP',],
91      }],
92      ['v8_trace_maps==1', {
93        'defines': ['TRACE_MAPS',],
94      }],
95      ['v8_enable_verify_predictable==1', {
96        'defines': ['VERIFY_PREDICTABLE',],
97      }],
98      ['v8_interpreted_regexp==1', {
99        'defines': ['V8_INTERPRETED_REGEXP',],
100      }],
101      ['v8_deprecation_warnings==1', {
102        'defines': ['V8_DEPRECATION_WARNINGS',],
103      }],
104      ['v8_imminent_deprecation_warnings==1', {
105        'defines': ['V8_IMMINENT_DEPRECATION_WARNINGS',],
106      }],
107      ['v8_enable_i18n_support==1', {
108        'defines': ['V8_I18N_SUPPORT',],
109      }],
110      ['v8_use_snapshot=="true" and v8_use_external_startup_data==1', {
111        'defines': ['V8_USE_EXTERNAL_STARTUP_DATA',],
112      }],
113      ['dcheck_always_on!=0', {
114        'defines': ['DEBUG',],
115      }],
116    ],  # conditions
117    'configurations': {
118      'DebugBaseCommon': {
119        'abstract': 1,
120        'variables': {
121          'v8_enable_handle_zapping%': 1,
122        },
123        'conditions': [
124          ['v8_enable_handle_zapping==1', {
125            'defines': ['ENABLE_HANDLE_ZAPPING',],
126          }],
127        ],
128      },  # Debug
129      'Release': {
130        'variables': {
131          'v8_enable_handle_zapping%': 0,
132        },
133        'conditions': [
134          ['v8_enable_handle_zapping==1', {
135            'defines': ['ENABLE_HANDLE_ZAPPING',],
136          }],
137        ],  # conditions
138      },  # Release
139    },  # configurations
140  },  # target_defaults
141}
142