|
56 | 56 | valid_mips_float_abi = ('soft', 'hard')
|
57 | 57 | valid_intl_modes = ('none', 'small-icu', 'full-icu', 'system-icu')
|
58 | 58 | icu_versions = json.loads((tools_path / 'icu' / 'icu_versions.json').read_text(encoding='utf-8'))
|
| 59 | +maglev_enabled_architectures = ('x64', 'arm', 'arm64') |
59 | 60 |
|
60 | 61 | shareable_builtins = {'cjs_module_lexer/lexer': 'deps/cjs-module-lexer/lexer.js',
|
61 | 62 | 'cjs_module_lexer/dist/lexer': 'deps/cjs-module-lexer/dist/lexer.js',
|
|
812 | 813 | help='Enable V8 transparent hugepage support. This feature is only '+
|
813 | 814 | 'available on Linux platform.')
|
814 | 815 |
|
815 |
| -parser.add_argument('--v8-enable-maglev', |
| 816 | +maglev_enabled_by_default_help = f"(Maglev is enabled by default on {','.join(maglev_enabled_architectures)})" |
| 817 | + |
| 818 | +parser.add_argument('--v8-disable-maglev', |
816 | 819 | action='store_true',
|
817 |
| - dest='v8_enable_maglev', |
| 820 | + dest='v8_disable_maglev', |
818 | 821 | default=None,
|
819 |
| - help='Enable V8 Maglev compiler. Not available on all platforms.') |
| 822 | + help=f"Disable V8's Maglev compiler. {maglev_enabled_by_default_help}") |
820 | 823 |
|
821 | 824 | parser.add_argument('--v8-enable-short-builtin-calls',
|
822 | 825 | action='store_true',
|
@@ -1498,7 +1501,8 @@ def configure_v8(o):
|
1498 | 1501 | o['variables']['v8_random_seed'] = 0 # Use a random seed for hash tables.
|
1499 | 1502 | o['variables']['v8_promise_internal_field_count'] = 1 # Add internal field to promises for async hooks.
|
1500 | 1503 | o['variables']['v8_use_siphash'] = 0 if options.without_siphash else 1
|
1501 |
| - o['variables']['v8_enable_maglev'] = 1 if options.v8_enable_maglev else 0 |
| 1504 | + o['variables']['v8_enable_maglev'] = B(not options.v8_disable_maglev and |
| 1505 | + o['variables']['target_arch'] in maglev_enabled_architectures) |
1502 | 1506 | o['variables']['v8_enable_pointer_compression'] = 1 if options.enable_pointer_compression else 0
|
1503 | 1507 | o['variables']['v8_enable_31bit_smis_on_64bit_arch'] = 1 if options.enable_pointer_compression else 0
|
1504 | 1508 | o['variables']['v8_enable_shared_ro_heap'] = 0 if options.enable_pointer_compression or options.disable_shared_ro_heap else 1
|
|
0 commit comments