Skip to content

Commit

Permalink
tools: update V8 gypfiles for 9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
targos committed Mar 7, 2021
1 parent 4e8f20f commit f187f87
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 15 deletions.
27 changes: 22 additions & 5 deletions tools/v8_gypfiles/features.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,6 @@
# Sets -DV8_ENABLE_FUTURE.
'v8_enable_future%': 0,

# Lite mode disables a number of performance optimizations to reduce memory
# at the cost of performance.
# Sets --DV8_LITE_MODE.
'v8_enable_lite_mode%': 0,

# Sets -DVERIFY_HEAP.
'v8_enable_verify_heap%': 0,

Expand Down Expand Up @@ -217,11 +212,27 @@
# Requires use_rtti = true
'v8_enable_precise_zone_stats%': 0,

# Experimental feature for tracking constness of properties in non-global
# dictionaries. Enabling this also always keeps prototypes in dict mode,
# meaning that they are not switched to fast mode.
# Sets -DV8_DICT_PROPERTY_CONST_TRACKING
'v8_dict_property_const_tracking%': 0,

# Variables from v8.gni

# Enable ECMAScript Internationalization API. Enabling this feature will
# add a dependency on the ICU library.
'v8_enable_i18n_support%': 1,

# Lite mode disables a number of performance optimizations to reduce memory
# at the cost of performance.
# Sets --DV8_LITE_MODE.
'v8_enable_lite_mode%': 0,

# Include support for WebAssembly. If disabled, the 'WebAssembly' global
# will not be available, and embedder APIs to generate WebAssembly modules
# will fail.
'v8_enable_webassembly%': 1,
},

'target_defaults': {
Expand Down Expand Up @@ -355,6 +366,12 @@
['v8_enable_precise_zone_stats==1', {
'defines': ['V8_ENABLE_PRECISE_ZONE_STATS',],
}],
['v8_enable_webassembly==1', {
'defines': ['V8_ENABLE_WEBASSEMBLY',],
}],
['v8_dict_property_const_tracking==1', {
'defines': ['V8_DICT_PROPERTY_CONST_TRACKING',],
}],
], # conditions
'defines': [
'V8_GYP_BUILD',
Expand Down
48 changes: 38 additions & 10 deletions tools/v8_gypfiles/v8.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -66,22 +66,24 @@
'outputs': [
"<(SHARED_INTERMEDIATE_DIR)/torque-generated/bit-fields.h",
"<(SHARED_INTERMEDIATE_DIR)/torque-generated/builtin-definitions.h",
"<(SHARED_INTERMEDIATE_DIR)/torque-generated/interface-descriptors.inc",
"<(SHARED_INTERMEDIATE_DIR)/torque-generated/factory.cc",
"<(SHARED_INTERMEDIATE_DIR)/torque-generated/factory.inc",
"<(SHARED_INTERMEDIATE_DIR)/torque-generated/field-offsets.h",
"<(SHARED_INTERMEDIATE_DIR)/torque-generated/class-debug-readers.cc",
"<(SHARED_INTERMEDIATE_DIR)/torque-generated/class-debug-readers.h",
"<(SHARED_INTERMEDIATE_DIR)/torque-generated/class-forward-declarations.h",
"<(SHARED_INTERMEDIATE_DIR)/torque-generated/class-verifiers.cc",
"<(SHARED_INTERMEDIATE_DIR)/torque-generated/class-verifiers.h",
"<(SHARED_INTERMEDIATE_DIR)/torque-generated/csa-types.h",
"<(SHARED_INTERMEDIATE_DIR)/torque-generated/debug-macros.cc",
"<(SHARED_INTERMEDIATE_DIR)/torque-generated/debug-macros.h",
"<(SHARED_INTERMEDIATE_DIR)/torque-generated/enum-verifiers.cc",
"<(SHARED_INTERMEDIATE_DIR)/torque-generated/objects-printer.cc",
"<(SHARED_INTERMEDIATE_DIR)/torque-generated/objects-body-descriptors-inl.inc",
"<(SHARED_INTERMEDIATE_DIR)/torque-generated/class-debug-readers.cc",
"<(SHARED_INTERMEDIATE_DIR)/torque-generated/class-debug-readers.h",
"<(SHARED_INTERMEDIATE_DIR)/torque-generated/exported-macros-assembler.cc",
"<(SHARED_INTERMEDIATE_DIR)/torque-generated/exported-macros-assembler.h",
"<(SHARED_INTERMEDIATE_DIR)/torque-generated/csa-types.h",
"<(SHARED_INTERMEDIATE_DIR)/torque-generated/factory.cc",
"<(SHARED_INTERMEDIATE_DIR)/torque-generated/factory.inc",
"<(SHARED_INTERMEDIATE_DIR)/torque-generated/field-offsets.h",
"<(SHARED_INTERMEDIATE_DIR)/torque-generated/instance-types.h",
"<(SHARED_INTERMEDIATE_DIR)/torque-generated/class-forward-declarations.h",
"<(SHARED_INTERMEDIATE_DIR)/torque-generated/interface-descriptors.inc",
"<(SHARED_INTERMEDIATE_DIR)/torque-generated/objects-body-descriptors-inl.inc",
"<(SHARED_INTERMEDIATE_DIR)/torque-generated/objects-printer.cc",
'<@(torque_outputs_csa_cc)',
'<@(torque_outputs_csa_h)',
'<@(torque_outputs_inl_inc)',
Expand Down Expand Up @@ -455,6 +457,8 @@
'<(V8_ROOT)/include/v8-cppgc.h',
'<(V8_ROOT)/include/v8-fast-api-calls.h',
'<(V8_ROOT)/include/v8-internal.h',
'<(V8_ROOT)/include/v8-profiler.h',
'<(V8_ROOT)/include/v8-util.h',
'<(V8_ROOT)/include/v8.h',
'<(V8_ROOT)/include/v8config.h',

Expand Down Expand Up @@ -603,6 +607,19 @@
'<(V8_ROOT)/src/heap/third-party/heap-api-stub.cc',
],
}],
['v8_enable_webassembly==1', {
'sources': [
'<(V8_ROOT)/src/asmjs/asm-js.cc',
'<(V8_ROOT)/src/asmjs/asm-js.h',
'<(V8_ROOT)/src/asmjs/asm-names.h',
'<(V8_ROOT)/src/asmjs/asm-parser.cc',
'<(V8_ROOT)/src/asmjs/asm-parser.h',
'<(V8_ROOT)/src/asmjs/asm-scanner.cc',
'<(V8_ROOT)/src/asmjs/asm-scanner.h',
'<(V8_ROOT)/src/asmjs/asm-types.cc',
'<(V8_ROOT)/src/asmjs/asm-types.h',
],
}],
['want_separate_host_toolset', {
'toolsets': ['host', 'target'],
}],
Expand Down Expand Up @@ -649,6 +666,13 @@
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"arm64\\".*?sources \+= ")',
],
'conditions': [
['OS=="mac"', {
'sources': [
"<(V8_ROOT)/src/trap-handler/handler-inside-posix.cc",
"<(V8_ROOT)/src/trap-handler/handler-inside-posix.h",
"<(V8_ROOT)/src/trap-handler/handler-outside-posix.cc",
],
}],
['OS=="win"', {
'sources': [
"<(V8_ROOT)/src/diagnostics/unwinding-info-win64.cc",
Expand Down Expand Up @@ -1180,6 +1204,7 @@
"<(V8_ROOT)/src/builtins/generate-bytecodes-builtins-list.cc",
"<(V8_ROOT)/src/interpreter/bytecode-operands.cc",
"<(V8_ROOT)/src/interpreter/bytecode-operands.h",
"<(V8_ROOT)/src/interpreter/bytecode-traits.h",
"<(V8_ROOT)/src/interpreter/bytecodes.cc",
"<(V8_ROOT)/src/interpreter/bytecodes.h",
],
Expand Down Expand Up @@ -1285,6 +1310,7 @@
],
'sources': [
"<(V8_ROOT)/src/regexp/gen-regexp-special-case.cc",
"<(V8_ROOT)/src/regexp/special-case.h",
],
}, # gen-regexp-special-case
{
Expand Down Expand Up @@ -1489,6 +1515,7 @@
'v8_enable_verify_csa=<(v8_enable_verify_csa)',
'v8_enable_lite_mode=<(v8_enable_lite_mode)',
'v8_enable_pointer_compression=<(v8_enable_pointer_compression)',
'v8_enable_webassembly=<(v8_enable_webassembly)',
]
},
'conditions': [
Expand Down Expand Up @@ -1573,6 +1600,7 @@
'<(V8_ROOT)/src/objects/primitive-heap-object.h',
'<(V8_ROOT)/src/objects/primitive-heap-object-inl.h',
'<(V8_ROOT)/src/objects/scope-info.h',
'<(V8_ROOT)/src/objects/scope-info-inl.h',
'<(V8_ROOT)/src/objects/script.h',
'<(V8_ROOT)/src/objects/script-inl.h',
'<(V8_ROOT)/src/objects/shared-function-info.cc',
Expand Down

0 comments on commit f187f87

Please sign in to comment.