(o, configs)
| 2141 | |
| 2142 | |
| 2143 | def configure_v8(o, configs): |
| 2144 | set_configuration_variable(configs, 'v8_enable_v8_checks', release=0, debug=1) |
| 2145 | |
| 2146 | o['variables']['v8_enable_webassembly'] = 0 if options.v8_lite_mode else 1 |
| 2147 | o['variables']['v8_enable_javascript_promise_hooks'] = 1 |
| 2148 | o['variables']['v8_enable_lite_mode'] = 1 if options.v8_lite_mode else 0 |
| 2149 | is_gdbjit_supported_arch = ( |
| 2150 | 'x64' in o['variables']['target_arch'] or |
| 2151 | 'ia32' in o['variables']['target_arch'] or |
| 2152 | 'ppc64' in o['variables']['target_arch'] |
| 2153 | ) |
| 2154 | is_linux = flavor == 'linux' |
| 2155 | if (options.gdb is not None): |
| 2156 | o['variables']['v8_enable_gdbjit'] = 1 if options.gdb else 0 |
| 2157 | else: |
| 2158 | o['variables']['v8_enable_gdbjit'] = 1 if is_gdbjit_supported_arch and is_linux else 0 |
| 2159 | o['variables']['v8_optimized_debug'] = 0 if options.v8_non_optimized_debug else 1 |
| 2160 | o['variables']['dcheck_always_on'] = 1 if options.v8_with_dchecks else 0 |
| 2161 | o['variables']['v8_enable_object_print'] = 0 if options.v8_disable_object_print else 1 |
| 2162 | o['variables']['v8_random_seed'] = 0 # Use a random seed for hash tables. |
| 2163 | o['variables']['v8_promise_internal_field_count'] = 1 # Add internal field to promises for async hooks. |
| 2164 | o['variables']['v8_use_siphash'] = 0 if options.without_siphash else 1 |
| 2165 | o['variables']['v8_enable_maglev'] = B(not options.v8_disable_maglev and |
| 2166 | flavor not in ('aix', 'os400', 'zos') and |
| 2167 | o['variables']['target_arch'] in maglev_enabled_architectures) |
| 2168 | o['variables']['v8_enable_pointer_compression'] = 1 if options.enable_pointer_compression else 0 |
| 2169 | # Using the sandbox requires always allocating array buffer backing stores in the sandbox. |
| 2170 | # We currently have many backing stores tied to pointers from C++ land that are not |
| 2171 | # even necessarily dynamic (e.g. in static storage) for fast communication between JS and C++. |
| 2172 | # Until we manage to get rid of all those, v8_enable_sandbox cannot be used. |
| 2173 | # Note that enabling pointer compression without enabling sandbox is unsupported by V8, |
| 2174 | # so this can be broken at any time. |
| 2175 | o['variables']['v8_enable_sandbox'] = 0 |
| 2176 | # We set v8_enable_pointer_compression_shared_cage to 0 always, even when |
| 2177 | # pointer compression is enabled so that we don't accidentally enable shared |
| 2178 | # cage mode when pointer compression is on. |
| 2179 | o['variables']['v8_enable_pointer_compression_shared_cage'] = 1 if options.pointer_compression_shared_cage else 0 |
| 2180 | o['variables']['v8_enable_external_code_space'] = 1 if options.enable_pointer_compression else 0 |
| 2181 | o['variables']['v8_enable_31bit_smis_on_64bit_arch'] = 1 if options.enable_pointer_compression else 0 |
| 2182 | o['variables']['v8_enable_extensible_ro_snapshot'] = 0 |
| 2183 | # TODO(richardlau): Temporal objects in V8 currently reference a private |
| 2184 | # ICU header file and fail to compile with shared ICU or no ICU. For now, |
| 2185 | # if auto-detecting, warn and disable Temporal in those cases. |
| 2186 | # Refs: https://github.com/nodejs/node/issues/62676 |
| 2187 | if (not options.v8_disable_temporal_support and not options.v8_enable_temporal_support): |
| 2188 | match options.with_intl: |
| 2189 | case 'none': |
| 2190 | warn('Temporal support disabled when compiling without ICU') |
| 2191 | options.v8_disable_temporal_support = True |
| 2192 | case 'system-icu': |
| 2193 | warn('Temporal support disabled when compiling with a shared ICU library') |
| 2194 | options.v8_disable_temporal_support = True |
| 2195 | o['variables']['v8_enable_temporal_support'] = 0 if options.v8_disable_temporal_support else 1 |
| 2196 | o['variables']['v8_trace_maps'] = 1 if options.trace_maps else 0 |
| 2197 | o['variables']['node_use_v8_platform'] = b(not options.without_v8_platform) |
| 2198 | o['variables']['node_use_bundled_v8'] = b(not options.without_bundled_v8) |
| 2199 | o['variables']['force_dynamic_crt'] = 1 if options.shared else 0 |
| 2200 | o['variables']['node_enable_d8'] = b(options.enable_d8) |
no test coverage detected
searching dependent graphs…