build,deps: refactor and fix v8.gyp
* Make inspector.gypi and v8_external_snapshot.gypi includible targets. * Make `v8_dump_build_config` an action * Better separate `js2c` and `natives_blob` * process action outputs as sources * trigger v8.gyp:postmortem-metadata from v8.gyp PR-URL: https://github.com/nodejs/node/pull/23182 Refs: https://github.com/nodejs/node/pull/23156 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
This commit is contained in:
parent
51f0060765
commit
9800fd7aaa
@ -31,7 +31,7 @@
|
||||
|
||||
# Reset this number to 0 on major V8 upgrades.
|
||||
# Increment by one for each non-official patch applied to deps/v8.
|
||||
'v8_embedder_string': '-node.2',
|
||||
'v8_embedder_string': '-node.3',
|
||||
|
||||
# Enable disassembler for `--print-code` v8 options
|
||||
'v8_enable_disassembler': 1,
|
||||
|
43
deps/v8/gypfiles/features.gypi
vendored
43
deps/v8/gypfiles/features.gypi
vendored
@ -29,9 +29,16 @@
|
||||
|
||||
{
|
||||
'variables': {
|
||||
'variables': {
|
||||
'v8_target_arch%': '<(target_arch)',
|
||||
},
|
||||
'v8_target_arch%': '<(target_arch)',
|
||||
|
||||
# Emulate GN variables
|
||||
'conditions': [
|
||||
['OS=="android"', { # GYP reverts OS to linux so use `-D OS=android`
|
||||
'is_android': 1,
|
||||
}, {
|
||||
'is_android': 0,
|
||||
}],
|
||||
],
|
||||
|
||||
# Allows the embedder to add a custom suffix to the version string.
|
||||
'v8_embedder_string%': '',
|
||||
@ -95,6 +102,8 @@
|
||||
|
||||
# Enable mitigations for executing untrusted code.
|
||||
'v8_untrusted_code_mitigations%': 'true',
|
||||
|
||||
'v8_enable_handle_zapping%': 1,
|
||||
},
|
||||
'target_defaults': {
|
||||
'conditions': [
|
||||
@ -105,7 +114,7 @@
|
||||
'defines': ['ENABLE_DISASSEMBLER',],
|
||||
}],
|
||||
['v8_promise_internal_field_count!=0', {
|
||||
'defines': ['V8_PROMISE_INTERNAL_FIELD_COUNT','v8_promise_internal_field_count'],
|
||||
'defines': ['V8_PROMISE_INTERNAL_FIELD_COUNT=<(v8_promise_internal_field_count)'],
|
||||
}],
|
||||
['v8_enable_gdbjit==1', {
|
||||
'defines': ['ENABLE_GDB_JIT_INTERFACE',],
|
||||
@ -155,30 +164,10 @@
|
||||
['v8_untrusted_code_mitigations=="false"', {
|
||||
'defines': ['DISABLE_UNTRUSTED_CODE_MITIGATIONS',],
|
||||
}],
|
||||
['v8_enable_handle_zapping==1', {
|
||||
'defines': ['ENABLE_HANDLE_ZAPPING',],
|
||||
}],
|
||||
], # conditions
|
||||
'configurations': {
|
||||
'DebugBaseCommon': {
|
||||
'abstract': 1,
|
||||
'variables': {
|
||||
'v8_enable_handle_zapping%': 1,
|
||||
},
|
||||
'conditions': [
|
||||
['v8_enable_handle_zapping==1', {
|
||||
'defines': ['ENABLE_HANDLE_ZAPPING',],
|
||||
}],
|
||||
],
|
||||
}, # Debug
|
||||
'Release': {
|
||||
'variables': {
|
||||
'v8_enable_handle_zapping%': 1,
|
||||
},
|
||||
'conditions': [
|
||||
['v8_enable_handle_zapping==1', {
|
||||
'defines': ['ENABLE_HANDLE_ZAPPING',],
|
||||
}],
|
||||
], # conditions
|
||||
}, # Release
|
||||
}, # configurations
|
||||
'defines': [
|
||||
'V8_GYP_BUILD',
|
||||
'V8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=<(v8_typed_array_max_size_in_heap)',
|
||||
|
89
deps/v8/gypfiles/inspector.gyp
vendored
89
deps/v8/gypfiles/inspector.gyp
vendored
@ -1,89 +0,0 @@
|
||||
# Copyright 2016 the V8 project authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
{
|
||||
'variables': {
|
||||
'protocol_path': '../third_party/inspector_protocol',
|
||||
'inspector_path': '../src/inspector',
|
||||
},
|
||||
'includes': [
|
||||
'inspector.gypi',
|
||||
'../third_party/inspector_protocol/inspector_protocol.gypi',
|
||||
],
|
||||
'targets': [
|
||||
{ 'target_name': 'inspector_injected_script',
|
||||
'type': 'none',
|
||||
'toolsets': ['target'],
|
||||
'actions': [
|
||||
{
|
||||
'action_name': 'convert_js_to_cpp_char_array',
|
||||
'inputs': [
|
||||
'<(inspector_path)/build/xxd.py',
|
||||
'<(inspector_injected_script_source)',
|
||||
],
|
||||
'outputs': [
|
||||
'<(inspector_generated_injected_script)',
|
||||
],
|
||||
'action': [
|
||||
'python',
|
||||
'<(inspector_path)/build/xxd.py',
|
||||
'InjectedScriptSource_js',
|
||||
'<(inspector_path)/injected-script-source.js',
|
||||
'<@(_outputs)'
|
||||
],
|
||||
},
|
||||
],
|
||||
# Since this target generates header files, it needs to be a hard dependency.
|
||||
'hard_dependency': 1,
|
||||
},
|
||||
{ 'target_name': 'protocol_compatibility',
|
||||
'type': 'none',
|
||||
'toolsets': ['target'],
|
||||
'actions': [
|
||||
{
|
||||
'action_name': 'protocol_compatibility',
|
||||
'inputs': [
|
||||
'<(inspector_path)/js_protocol.json',
|
||||
],
|
||||
'outputs': [
|
||||
'<@(SHARED_INTERMEDIATE_DIR)/src/js_protocol.stamp',
|
||||
],
|
||||
'action': [
|
||||
'python',
|
||||
'<(protocol_path)/CheckProtocolCompatibility.py',
|
||||
'--stamp', '<@(_outputs)',
|
||||
'<(inspector_path)/js_protocol.json',
|
||||
],
|
||||
'message': 'Generating inspector protocol sources from protocol json definition',
|
||||
},
|
||||
]
|
||||
},
|
||||
{ 'target_name': 'protocol_generated_sources',
|
||||
'type': 'none',
|
||||
'dependencies': [ 'protocol_compatibility' ],
|
||||
'toolsets': ['target'],
|
||||
'actions': [
|
||||
{
|
||||
'action_name': 'protocol_generated_sources',
|
||||
'inputs': [
|
||||
'<(inspector_path)/js_protocol.json',
|
||||
'<(inspector_path)/inspector_protocol_config.json',
|
||||
'<@(inspector_protocol_files)',
|
||||
],
|
||||
'outputs': [
|
||||
'<@(inspector_generated_sources)',
|
||||
],
|
||||
'action': [
|
||||
'python',
|
||||
'<(protocol_path)/CodeGenerator.py',
|
||||
'--jinja_dir', '../third_party',
|
||||
'--output_base', '<(SHARED_INTERMEDIATE_DIR)/src/inspector',
|
||||
'--config', '<(inspector_path)/inspector_protocol_config.json',
|
||||
],
|
||||
'message': 'Generating inspector protocol sources from protocol json',
|
||||
},
|
||||
]
|
||||
},
|
||||
],
|
||||
}
|
66
deps/v8/gypfiles/inspector.gypi
vendored
66
deps/v8/gypfiles/inspector.gypi
vendored
@ -4,6 +4,9 @@
|
||||
|
||||
{
|
||||
'variables': {
|
||||
'protocol_path': '../third_party/inspector_protocol',
|
||||
'inspector_path': '../src/inspector',
|
||||
|
||||
'inspector_generated_sources': [
|
||||
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Forward.h',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Protocol.cpp',
|
||||
@ -29,8 +32,6 @@
|
||||
'inspector_generated_injected_script': '<(SHARED_INTERMEDIATE_DIR)/src/inspector/injected-script-source.h',
|
||||
|
||||
'inspector_all_sources': [
|
||||
'<@(inspector_generated_sources)',
|
||||
'<(inspector_generated_injected_script)',
|
||||
'../include/v8-inspector.h',
|
||||
'../include/v8-inspector-protocol.h',
|
||||
'../src/inspector/injected-script.cc',
|
||||
@ -86,5 +87,64 @@
|
||||
'../src/inspector/wasm-translation.cc',
|
||||
'../src/inspector/wasm-translation.h',
|
||||
]
|
||||
}
|
||||
},
|
||||
'includes': [
|
||||
'../third_party/inspector_protocol/inspector_protocol.gypi',
|
||||
],
|
||||
'actions': [
|
||||
{
|
||||
'action_name': 'protocol_compatibility',
|
||||
'inputs': [
|
||||
'<(inspector_path)/js_protocol.json',
|
||||
],
|
||||
'outputs': [
|
||||
'<@(SHARED_INTERMEDIATE_DIR)/src/js_protocol.stamp',
|
||||
],
|
||||
'action': [
|
||||
'python',
|
||||
'<(protocol_path)/CheckProtocolCompatibility.py',
|
||||
'--stamp', '<@(_outputs)',
|
||||
'<(inspector_path)/js_protocol.json',
|
||||
],
|
||||
'message': 'Checking inspector protocol compatibility',
|
||||
},
|
||||
{
|
||||
'action_name': 'protocol_generated_sources',
|
||||
'inputs': [
|
||||
'<(inspector_path)/js_protocol.json',
|
||||
'<(inspector_path)/inspector_protocol_config.json',
|
||||
'<@(inspector_protocol_files)',
|
||||
],
|
||||
'outputs': [
|
||||
'<@(inspector_generated_sources)',
|
||||
],
|
||||
'process_outputs_as_sources': 1,
|
||||
'action': [
|
||||
'python',
|
||||
'<(protocol_path)/CodeGenerator.py',
|
||||
'--jinja_dir', '../third_party',
|
||||
'--output_base', '<(SHARED_INTERMEDIATE_DIR)/src/inspector',
|
||||
'--config', '<(inspector_path)/inspector_protocol_config.json',
|
||||
],
|
||||
'message': 'Generating inspector protocol sources from protocol json',
|
||||
},
|
||||
{
|
||||
'action_name': 'convert_js_to_cpp_char_array',
|
||||
'inputs': [
|
||||
'<(inspector_path)/build/xxd.py',
|
||||
'<(inspector_injected_script_source)',
|
||||
],
|
||||
'outputs': [
|
||||
'<(inspector_generated_injected_script)',
|
||||
],
|
||||
'process_outputs_as_sources': 1,
|
||||
'action': [
|
||||
'python',
|
||||
'<(inspector_path)/build/xxd.py',
|
||||
'InjectedScriptSource_js',
|
||||
'<(inspector_path)/injected-script-source.js',
|
||||
'<@(_outputs)'
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
|
19
deps/v8/gypfiles/toolchain.gypi
vendored
19
deps/v8/gypfiles/toolchain.gypi
vendored
@ -1425,5 +1425,24 @@
|
||||
}],
|
||||
],
|
||||
}, # configurations
|
||||
'msvs_disabled_warnings': [
|
||||
4245, # Conversion with signed/unsigned mismatch.
|
||||
4267, # Conversion with possible loss of data.
|
||||
4324, # Padding structure due to alignment.
|
||||
4701, # Potentially uninitialized local variable.
|
||||
4702, # Unreachable code.
|
||||
4703, # Potentially uninitialized local pointer variable.
|
||||
4709, # Comma operator within array index expr (bugged).
|
||||
4714, # Function marked forceinline not inlined.
|
||||
|
||||
# MSVC assumes that control can get past an exhaustive switch and then
|
||||
# warns if there's no return there (see https://crbug.com/v8/7658)
|
||||
4715, # Not all control paths return a value.
|
||||
|
||||
4718, # Recursive call has no side-effect.
|
||||
4723, # https://crbug.com/v8/7771
|
||||
4724, # https://crbug.com/v8/7771
|
||||
4800, # Forcing value to bool.
|
||||
],
|
||||
}, # target_defaults
|
||||
}
|
||||
|
617
deps/v8/gypfiles/v8.gyp
vendored
617
deps/v8/gypfiles/v8.gyp
vendored
@ -7,19 +7,20 @@
|
||||
'v8_code': 1,
|
||||
'v8_random_seed%': 314159265,
|
||||
'v8_vector_stores%': 0,
|
||||
'embed_script%': "",
|
||||
'warmup_script%': "",
|
||||
'v8_embed_script%': "",
|
||||
'v8_extra_library_files%': [],
|
||||
'v8_experimental_extra_library_files%': [],
|
||||
'mksnapshot_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot<(EXECUTABLE_SUFFIX)',
|
||||
'v8_os_page_size%': 0,
|
||||
'torque_generated_pure_headers': [
|
||||
'<(SHARED_INTERMEDIATE_DIR)/torque-generated/builtin-definitions-from-dsl.h',
|
||||
],
|
||||
},
|
||||
'includes': ['toolchain.gypi', 'features.gypi', 'inspector.gypi'],
|
||||
'includes': ['toolchain.gypi', 'features.gypi'],
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'v8',
|
||||
'dependencies_traverse': 1,
|
||||
'dependencies': ['v8_maybe_snapshot', 'v8_dump_build_config#target'],
|
||||
'dependencies': [ 'v8_maybe_snapshot' ],
|
||||
'conditions': [
|
||||
['want_separate_host_toolset==1', {
|
||||
'toolsets': ['host', 'target'],
|
||||
@ -60,11 +61,55 @@
|
||||
}],
|
||||
],
|
||||
'direct_dependent_settings': {
|
||||
'include_dirs': [
|
||||
'../include/',
|
||||
],
|
||||
'include_dirs': [ '../include/', ],
|
||||
},
|
||||
},
|
||||
'actions': [
|
||||
{
|
||||
'action_name': 'v8_dump_build_config',
|
||||
'toolsets': ['target'],
|
||||
'inputs': [
|
||||
'../tools/testrunner/utils/dump_build_config_gyp.py',
|
||||
],
|
||||
'outputs': [
|
||||
'<(PRODUCT_DIR)/v8_build_config.json',
|
||||
],
|
||||
'variables': {
|
||||
'v8_dump_build_config_args': [
|
||||
'<(PRODUCT_DIR)/v8_build_config.json',
|
||||
'dcheck_always_on=<(dcheck_always_on)',
|
||||
'is_asan=<(asan)',
|
||||
'is_cfi=<(cfi_vptr)',
|
||||
'is_component_build=<(component)',
|
||||
'is_debug=<(CONFIGURATION_NAME)',
|
||||
# Not available in gyp.
|
||||
'is_gcov_coverage=0',
|
||||
'is_msan=<(msan)',
|
||||
'is_tsan=<(tsan)',
|
||||
# Not available in gyp.
|
||||
'is_ubsan_vptr=0',
|
||||
'target_cpu=<(target_arch)',
|
||||
'v8_enable_i18n_support=<(v8_enable_i18n_support)',
|
||||
'v8_enable_verify_predictable=<(v8_enable_verify_predictable)',
|
||||
'v8_target_cpu=<(v8_target_arch)',
|
||||
'v8_use_snapshot=<(v8_use_snapshot)',
|
||||
]
|
||||
},
|
||||
'conditions': [
|
||||
['v8_target_arch=="mips" or v8_target_arch=="mipsel" \
|
||||
or v8_target_arch=="mips64" or v8_target_arch=="mips64el"', {
|
||||
'v8_dump_build_config_args':[
|
||||
'mips_arch_variant=<(mips_arch_variant)',
|
||||
'mips_use_msa=<(mips_use_msa)',
|
||||
],
|
||||
}],
|
||||
],
|
||||
'action': [
|
||||
'python', '../tools/testrunner/utils/dump_build_config_gyp.py',
|
||||
'<@(v8_dump_build_config_args)',
|
||||
],
|
||||
},
|
||||
],
|
||||
}, # v8
|
||||
{
|
||||
# This rule delegates to either v8_snapshot, v8_nosnapshot, or
|
||||
# v8_external_snapshot, depending on the current variables.
|
||||
@ -86,21 +131,9 @@
|
||||
}],
|
||||
['v8_use_snapshot=="true" and v8_use_external_startup_data==1 and want_separate_host_toolset==0', {
|
||||
'dependencies': ['v8_base', 'v8_external_snapshot'],
|
||||
'inputs': [ '<(PRODUCT_DIR)/snapshot_blob.bin', ],
|
||||
}],
|
||||
['v8_use_snapshot=="true" and v8_use_external_startup_data==1 and want_separate_host_toolset==1', {
|
||||
'dependencies': ['v8_base', 'v8_external_snapshot'],
|
||||
'target_conditions': [
|
||||
['_toolset=="host"', {
|
||||
'inputs': [
|
||||
'<(PRODUCT_DIR)/snapshot_blob_host.bin',
|
||||
],
|
||||
}, {
|
||||
'inputs': [
|
||||
'<(PRODUCT_DIR)/snapshot_blob.bin',
|
||||
],
|
||||
}],
|
||||
],
|
||||
}],
|
||||
['want_separate_host_toolset==1', {
|
||||
'toolsets': ['host', 'target'],
|
||||
@ -108,24 +141,27 @@
|
||||
'toolsets': ['target'],
|
||||
}],
|
||||
]
|
||||
},
|
||||
}, # v8_maybe_snapshot
|
||||
{
|
||||
'target_name': 'v8_init',
|
||||
'type': 'static_library',
|
||||
'dependencies': [
|
||||
'v8_initializers',
|
||||
'v8_torque#host',
|
||||
# We need this transitive dependency, since it also does codegen.
|
||||
'v8_base',
|
||||
],
|
||||
'variables': {
|
||||
'optimize': 'max',
|
||||
},
|
||||
'include_dirs+': [
|
||||
'include_dirs': [
|
||||
'..',
|
||||
'../include/',
|
||||
# This is for `gen/builtins-generated`
|
||||
'<(SHARED_INTERMEDIATE_DIR)',
|
||||
],
|
||||
'sources': [
|
||||
'../src/setup-isolate-full.cc',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/torque-generated/builtin-definitions-from-dsl.h',
|
||||
'<@(torque_generated_pure_headers)',
|
||||
],
|
||||
'conditions': [
|
||||
['want_separate_host_toolset==1', {
|
||||
@ -140,18 +176,17 @@
|
||||
],
|
||||
}],
|
||||
],
|
||||
},
|
||||
}, # v8_init
|
||||
{
|
||||
'target_name': 'v8_initializers',
|
||||
'type': 'static_library',
|
||||
'dependencies': [
|
||||
'v8_base',
|
||||
'v8_torque#host',
|
||||
],
|
||||
'variables': {
|
||||
'optimize': 'max',
|
||||
},
|
||||
'include_dirs+': [
|
||||
'include_dirs': [
|
||||
'..',
|
||||
'../include/',
|
||||
],
|
||||
@ -234,6 +269,7 @@
|
||||
'<(SHARED_INTERMEDIATE_DIR)/torque-generated/builtins-typed-array-from-dsl-gen.h',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/torque-generated/builtins-data-view-from-dsl-gen.cc',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/torque-generated/builtins-data-view-from-dsl-gen.h',
|
||||
'<@(torque_generated_pure_headers)',
|
||||
],
|
||||
'conditions': [
|
||||
['want_separate_host_toolset==1', {
|
||||
@ -292,7 +328,7 @@
|
||||
],
|
||||
}],
|
||||
],
|
||||
},
|
||||
}, # v8_initializers
|
||||
{
|
||||
'target_name': 'v8_snapshot',
|
||||
'type': 'static_library',
|
||||
@ -331,68 +367,67 @@
|
||||
'dependencies': [
|
||||
'v8_base',
|
||||
],
|
||||
'include_dirs+': [
|
||||
'include_dirs': [
|
||||
'..',
|
||||
'<(DEPTH)',
|
||||
],
|
||||
'variables': {
|
||||
'mksnapshot_flags': [ '--turbo_instruction_scheduling', ],
|
||||
'conditional_snapshot_outputs': [ ],
|
||||
'conditional_inputs': [ ],
|
||||
'conditions': [
|
||||
['v8_random_seed != 0', {
|
||||
'mksnapshot_flags': ['--random-seed', '<(v8_random_seed)'],
|
||||
}],
|
||||
['v8_os_page_size != 0', {
|
||||
'mksnapshot_flags': ['--v8_os_page_size', '<(v8_os_page_size)'],
|
||||
}],
|
||||
['v8_use_external_startup_data !=0 ', {
|
||||
'conditional_snapshot_outputs': [ '<(INTERMEDIATE_DIR)/snapshot_blob.bin', ],
|
||||
'mksnapshot_flags': [ '--startup_blob', '<(INTERMEDIATE_DIR)/snapshot_blob.bin', ]
|
||||
}, {
|
||||
'conditional_snapshot_outputs': [ "<(INTERMEDIATE_DIR)/snapshot.cc" ],
|
||||
'mksnapshot_flags': [ '--startup_src', '<(INTERMEDIATE_DIR)/snapshot.cc', ]
|
||||
}],
|
||||
['v8_embed_script != ""', {
|
||||
'conditional_inputs': [ '<(v8_embed_script)' ],
|
||||
'mksnapshot_flags': [ '<(v8_embed_script)' ],
|
||||
}],
|
||||
],
|
||||
},
|
||||
'sources': [
|
||||
'<(SHARED_INTERMEDIATE_DIR)/experimental-extras-libraries.cc',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/extras-libraries.cc',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/libraries.cc',
|
||||
'<(INTERMEDIATE_DIR)/snapshot.cc',
|
||||
'../src/setup-isolate-deserialize.cc',
|
||||
'../src/snapshot/embedded-empty.cc',
|
||||
],
|
||||
'actions': [
|
||||
{
|
||||
'action_name': 'run_mksnapshot',
|
||||
'message': 'generating: >@(conditional_snapshot_outputs)',
|
||||
'inputs': [
|
||||
'<(mksnapshot_exec)',
|
||||
],
|
||||
'conditions': [
|
||||
['embed_script!=""', {
|
||||
'inputs': [
|
||||
'<(embed_script)',
|
||||
],
|
||||
}],
|
||||
['warmup_script!=""', {
|
||||
'inputs': [
|
||||
'<(warmup_script)',
|
||||
],
|
||||
}],
|
||||
'>@(conditional_inputs)',
|
||||
],
|
||||
'outputs': [
|
||||
'<(INTERMEDIATE_DIR)/snapshot.cc',
|
||||
'>@(conditional_snapshot_outputs)',
|
||||
],
|
||||
'variables': {
|
||||
'mksnapshot_flags': [],
|
||||
'conditions': [
|
||||
['v8_random_seed!=0', {
|
||||
'mksnapshot_flags': ['--random-seed', '<(v8_random_seed)'],
|
||||
}],
|
||||
['v8_vector_stores!=0', {
|
||||
'mksnapshot_flags': ['--vector-stores'],
|
||||
}],
|
||||
],
|
||||
},
|
||||
'process_outputs_as_sources': 1,
|
||||
'action': [
|
||||
'<(mksnapshot_exec)',
|
||||
'<@(mksnapshot_flags)',
|
||||
'--startup_src', '<@(INTERMEDIATE_DIR)/snapshot.cc',
|
||||
'<(embed_script)',
|
||||
'<(warmup_script)',
|
||||
'>@(_inputs)',
|
||||
'>@(mksnapshot_flags)',
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
}, # v8_snapshot
|
||||
{
|
||||
'target_name': 'v8_nosnapshot',
|
||||
'type': 'static_library',
|
||||
'dependencies': [
|
||||
'v8_base',
|
||||
'v8_torque#host',
|
||||
],
|
||||
'include_dirs+': [
|
||||
'include_dirs': [
|
||||
'..',
|
||||
'<(DEPTH)',
|
||||
],
|
||||
@ -423,144 +458,27 @@
|
||||
],
|
||||
}],
|
||||
]
|
||||
},
|
||||
{
|
||||
'target_name': 'v8_external_snapshot',
|
||||
'type': 'static_library',
|
||||
'conditions': [
|
||||
[ 'v8_use_external_startup_data==1', {
|
||||
'conditions': [
|
||||
['want_separate_host_toolset==1', {
|
||||
'toolsets': ['host', 'target'],
|
||||
'dependencies': [
|
||||
'mksnapshot#host',
|
||||
'js2c#host',
|
||||
'natives_blob',
|
||||
]}, {
|
||||
'toolsets': ['target'],
|
||||
'dependencies': [
|
||||
'mksnapshot',
|
||||
'js2c',
|
||||
'natives_blob',
|
||||
],
|
||||
}],
|
||||
['component=="shared_library"', {
|
||||
'defines': [
|
||||
'BUILDING_V8_SHARED',
|
||||
],
|
||||
'direct_dependent_settings': {
|
||||
'defines': [
|
||||
'USING_V8_SHARED',
|
||||
],
|
||||
},
|
||||
}],
|
||||
],
|
||||
'dependencies': [
|
||||
'v8_base',
|
||||
],
|
||||
'include_dirs+': [
|
||||
'..',
|
||||
'<(DEPTH)',
|
||||
],
|
||||
'sources': [
|
||||
'../src/setup-isolate-deserialize.cc',
|
||||
'../src/snapshot/embedded-empty.cc',
|
||||
'../src/snapshot/natives-external.cc',
|
||||
'../src/snapshot/snapshot-external.cc',
|
||||
],
|
||||
'actions': [
|
||||
{
|
||||
'action_name': 'run_mksnapshot (external)',
|
||||
'inputs': [
|
||||
'<(mksnapshot_exec)',
|
||||
],
|
||||
'variables': {
|
||||
'mksnapshot_flags': [],
|
||||
'conditions': [
|
||||
['v8_random_seed!=0', {
|
||||
'mksnapshot_flags': ['--random-seed', '<(v8_random_seed)'],
|
||||
}],
|
||||
['v8_vector_stores!=0', {
|
||||
'mksnapshot_flags': ['--vector-stores'],
|
||||
}],
|
||||
['v8_os_page_size!=0', {
|
||||
'mksnapshot_flags': ['--v8_os_page_size', '<(v8_os_page_size)'],
|
||||
}],
|
||||
],
|
||||
},
|
||||
'conditions': [
|
||||
['embed_script!=""', {
|
||||
'inputs': [
|
||||
'<(embed_script)',
|
||||
],
|
||||
}],
|
||||
['warmup_script!=""', {
|
||||
'inputs': [
|
||||
'<(warmup_script)',
|
||||
],
|
||||
}],
|
||||
['want_separate_host_toolset==1', {
|
||||
'target_conditions': [
|
||||
['_toolset=="host"', {
|
||||
'outputs': [
|
||||
'<(PRODUCT_DIR)/snapshot_blob_host.bin',
|
||||
],
|
||||
'action': [
|
||||
'<(mksnapshot_exec)',
|
||||
'<@(mksnapshot_flags)',
|
||||
'--startup_blob', '<(PRODUCT_DIR)/snapshot_blob_host.bin',
|
||||
'<(embed_script)',
|
||||
'<(warmup_script)',
|
||||
],
|
||||
}, {
|
||||
'outputs': [
|
||||
'<(PRODUCT_DIR)/snapshot_blob.bin',
|
||||
],
|
||||
'action': [
|
||||
'<(mksnapshot_exec)',
|
||||
'<@(mksnapshot_flags)',
|
||||
'--startup_blob', '<(PRODUCT_DIR)/snapshot_blob.bin',
|
||||
'<(embed_script)',
|
||||
'<(warmup_script)',
|
||||
],
|
||||
}],
|
||||
],
|
||||
}, {
|
||||
'outputs': [
|
||||
'<(PRODUCT_DIR)/snapshot_blob.bin',
|
||||
],
|
||||
'action': [
|
||||
'<(mksnapshot_exec)',
|
||||
'<@(mksnapshot_flags)',
|
||||
'--startup_blob', '<(PRODUCT_DIR)/snapshot_blob.bin',
|
||||
'<(embed_script)',
|
||||
'<(warmup_script)',
|
||||
],
|
||||
}],
|
||||
],
|
||||
},
|
||||
],
|
||||
}],
|
||||
],
|
||||
},
|
||||
}, # v8_nosnapshot
|
||||
{
|
||||
'target_name': 'v8_base',
|
||||
'type': 'static_library',
|
||||
# Since this target is a static-library, but as a side effect it generates
|
||||
# header files, it needs to be a hard dependency.
|
||||
'hard_dependency': 1,
|
||||
'includes': [ 'inspector.gypi' ],
|
||||
'dependencies': [
|
||||
'v8_libbase',
|
||||
'v8_libsampler',
|
||||
'v8_torque#host',
|
||||
'inspector.gyp:protocol_generated_sources#target',
|
||||
'inspector.gyp:inspector_injected_script#target',
|
||||
],
|
||||
'direct_dependent_settings': {
|
||||
'include_dirs+': ['<(SHARED_INTERMEDIATE_DIR)'],
|
||||
'include_dirs': ['<(SHARED_INTERMEDIATE_DIR)'],
|
||||
},
|
||||
'objs': ['foo.o'],
|
||||
'variables': {
|
||||
'optimize': 'max',
|
||||
},
|
||||
'include_dirs+': [
|
||||
'include_dirs': [
|
||||
'..',
|
||||
'<(DEPTH)',
|
||||
'<(SHARED_INTERMEDIATE_DIR)'
|
||||
@ -1636,7 +1554,7 @@
|
||||
'../src/zone/zone-segment.h',
|
||||
'../src/zone/zone.cc',
|
||||
'../src/zone/zone.h',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/torque-generated/builtin-definitions-from-dsl.h',
|
||||
'<@(torque_generated_pure_headers)',
|
||||
],
|
||||
'conditions': [
|
||||
['want_separate_host_toolset==1', {
|
||||
@ -1948,9 +1866,10 @@
|
||||
],
|
||||
}],
|
||||
['v8_postmortem_support=="true"', {
|
||||
'dependencies': [ 'postmortem-metadata#target' ],
|
||||
'sources': [
|
||||
'<(SHARED_INTERMEDIATE_DIR)/debug-support.cc',
|
||||
]
|
||||
],
|
||||
}],
|
||||
['v8_enable_i18n_support==1', {
|
||||
'dependencies': [
|
||||
@ -2004,7 +1923,7 @@
|
||||
],
|
||||
}],
|
||||
],
|
||||
},
|
||||
}, # v8_base
|
||||
{
|
||||
'target_name': 'v8_libbase',
|
||||
'type': '<(component)',
|
||||
@ -2012,11 +1931,11 @@
|
||||
'variables': {
|
||||
'optimize': 'max',
|
||||
},
|
||||
'include_dirs+': [
|
||||
'include_dirs': [
|
||||
'..',
|
||||
],
|
||||
'direct_dependent_settings': {
|
||||
'include_dirs+': ['..'],
|
||||
'include_dirs': ['..'],
|
||||
},
|
||||
'sources': [
|
||||
'../src/base/adapters.h',
|
||||
@ -2338,7 +2257,7 @@
|
||||
}
|
||||
],
|
||||
],
|
||||
},
|
||||
}, # v8_libbase
|
||||
{
|
||||
'target_name': 'v8_libplatform',
|
||||
'type': '<(component)',
|
||||
@ -2348,15 +2267,15 @@
|
||||
'dependencies': [
|
||||
'v8_libbase',
|
||||
],
|
||||
'include_dirs+': [
|
||||
'include_dirs': [
|
||||
'..',
|
||||
'<(DEPTH)',
|
||||
'../include/',
|
||||
],
|
||||
'sources': [
|
||||
'../include//libplatform/libplatform-export.h',
|
||||
'../include//libplatform/libplatform.h',
|
||||
'../include//libplatform/v8-tracing.h',
|
||||
'../include/libplatform/libplatform-export.h',
|
||||
'../include/libplatform/libplatform.h',
|
||||
'../include/libplatform/v8-tracing.h',
|
||||
'../src/libplatform/default-foreground-task-runner.cc',
|
||||
'../src/libplatform/default-foreground-task-runner.h',
|
||||
'../src/libplatform/default-platform.cc',
|
||||
@ -2393,7 +2312,7 @@
|
||||
'../include/',
|
||||
],
|
||||
},
|
||||
},
|
||||
}, # v8_libplatform
|
||||
{
|
||||
'target_name': 'v8_libsampler',
|
||||
'type': 'static_library',
|
||||
@ -2403,7 +2322,7 @@
|
||||
'dependencies': [
|
||||
'v8_libbase',
|
||||
],
|
||||
'include_dirs+': [
|
||||
'include_dirs': [
|
||||
'..',
|
||||
'../include/',
|
||||
],
|
||||
@ -2423,11 +2342,16 @@
|
||||
'../include/',
|
||||
],
|
||||
},
|
||||
},
|
||||
}, # v8_libsampler
|
||||
{
|
||||
'target_name': 'natives_blob',
|
||||
'type': 'none',
|
||||
'conditions': [
|
||||
['want_separate_host_toolset==1', {
|
||||
'toolsets': ['host', 'target'],
|
||||
}, {
|
||||
'toolsets': ['target'],
|
||||
}],
|
||||
[ 'v8_use_external_startup_data==1', {
|
||||
'conditions': [
|
||||
['want_separate_host_toolset==1', {
|
||||
@ -2436,51 +2360,99 @@
|
||||
'dependencies': ['js2c'],
|
||||
}],
|
||||
],
|
||||
'actions': [{
|
||||
'action_name': 'concatenate_natives_blob',
|
||||
'inputs': [
|
||||
'../tools//concatenate-files.py',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/libraries.bin',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/libraries-extras.bin',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/libraries-experimental-extras.bin',
|
||||
],
|
||||
'conditions': [
|
||||
['want_separate_host_toolset==1', {
|
||||
'target_conditions': [
|
||||
['_toolset=="host"', {
|
||||
'outputs': [
|
||||
'<(PRODUCT_DIR)/natives_blob_host.bin',
|
||||
],
|
||||
'action': [
|
||||
'python', '<@(_inputs)', '<(PRODUCT_DIR)/natives_blob_host.bin'
|
||||
],
|
||||
}, {
|
||||
'outputs': [
|
||||
'<(PRODUCT_DIR)/natives_blob.bin',
|
||||
],
|
||||
'action': [
|
||||
'python', '<@(_inputs)', '<(PRODUCT_DIR)/natives_blob.bin'
|
||||
],
|
||||
}],
|
||||
],
|
||||
}, {
|
||||
'outputs': [
|
||||
'<(PRODUCT_DIR)/natives_blob.bin',
|
||||
],
|
||||
'action': [
|
||||
'python', '<@(_inputs)', '<(PRODUCT_DIR)/natives_blob.bin'
|
||||
],
|
||||
}],
|
||||
],
|
||||
}],
|
||||
}],
|
||||
['want_separate_host_toolset==1', {
|
||||
'toolsets': ['host', 'target'],
|
||||
}, {
|
||||
'toolsets': ['target'],
|
||||
'actions': [
|
||||
{
|
||||
'action_name': 'js2c_bin',
|
||||
'inputs': [
|
||||
'../tools/js2c.py',
|
||||
'<@(library_files)',
|
||||
],
|
||||
'outputs': ['<@(libraries_bin_file)'],
|
||||
'action': [
|
||||
'python',
|
||||
'../tools/js2c.py',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/libraries.cc',
|
||||
'CORE',
|
||||
'<@(library_files)',
|
||||
'--startup_blob', '<@(libraries_bin_file)',
|
||||
'--nojs',
|
||||
],
|
||||
},
|
||||
{
|
||||
'action_name': 'js2c_extras_bin',
|
||||
'inputs': [
|
||||
'../tools/js2c.py',
|
||||
'<@(v8_extra_library_files)',
|
||||
],
|
||||
'outputs': ['<@(libraries_extras_bin_file)'],
|
||||
'action': [
|
||||
'python',
|
||||
'../tools/js2c.py',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/extras-libraries.cc',
|
||||
'EXTRAS',
|
||||
'<@(v8_extra_library_files)',
|
||||
'--startup_blob', '<@(libraries_extras_bin_file)',
|
||||
'--nojs',
|
||||
],
|
||||
},
|
||||
{
|
||||
'action_name': 'js2c_experimental_extras_bin',
|
||||
'inputs': [
|
||||
'../tools/js2c.py',
|
||||
'<@(v8_experimental_extra_library_files)',
|
||||
],
|
||||
'outputs': ['<@(libraries_experimental_extras_bin_file)'],
|
||||
'action': [
|
||||
'python',
|
||||
'../tools/js2c.py',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/experimental-extras-libraries.cc',
|
||||
'EXPERIMENTAL_EXTRAS',
|
||||
'<@(v8_experimental_extra_library_files)',
|
||||
'--startup_blob', '<@(libraries_experimental_extras_bin_file)',
|
||||
'--nojs',
|
||||
],
|
||||
},
|
||||
{
|
||||
'action_name': 'concatenate_natives_blob',
|
||||
'inputs': [
|
||||
'../tools/concatenate-files.py',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/libraries.bin',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/libraries-extras.bin',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/libraries-experimental-extras.bin',
|
||||
],
|
||||
'conditions': [
|
||||
['want_separate_host_toolset==1', {
|
||||
'target_conditions': [
|
||||
['_toolset=="host"', {
|
||||
'outputs': [
|
||||
'<(PRODUCT_DIR)/natives_blob_host.bin',
|
||||
],
|
||||
'action': [
|
||||
'python', '<@(_inputs)', '<(PRODUCT_DIR)/natives_blob_host.bin'
|
||||
],
|
||||
}, {
|
||||
'outputs': [
|
||||
'<(PRODUCT_DIR)/natives_blob.bin',
|
||||
],
|
||||
'action': [
|
||||
'python', '<@(_inputs)', '<(PRODUCT_DIR)/natives_blob.bin'
|
||||
],
|
||||
}],
|
||||
],
|
||||
}, {
|
||||
'outputs': [
|
||||
'<(PRODUCT_DIR)/natives_blob.bin',
|
||||
],
|
||||
'action': [
|
||||
'python', '<@(_inputs)', '<(PRODUCT_DIR)/natives_blob.bin'
|
||||
],
|
||||
}],
|
||||
],
|
||||
},
|
||||
],
|
||||
}],
|
||||
]
|
||||
},
|
||||
}, # natives_blob
|
||||
{
|
||||
'target_name': 'js2c',
|
||||
'type': 'none',
|
||||
@ -2512,71 +2484,37 @@
|
||||
{
|
||||
'action_name': 'js2c',
|
||||
'inputs': [
|
||||
'../tools//js2c.py',
|
||||
'../tools/js2c.py',
|
||||
'<@(library_files)',
|
||||
],
|
||||
'outputs': ['<(SHARED_INTERMEDIATE_DIR)/libraries.cc'],
|
||||
'action': [
|
||||
'python',
|
||||
'../tools//js2c.py',
|
||||
'../tools/js2c.py',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/libraries.cc',
|
||||
'CORE',
|
||||
'<@(library_files)',
|
||||
],
|
||||
},
|
||||
{
|
||||
'action_name': 'js2c_bin',
|
||||
'inputs': [
|
||||
'../tools//js2c.py',
|
||||
'<@(library_files)',
|
||||
],
|
||||
'outputs': ['<@(libraries_bin_file)'],
|
||||
'action': [
|
||||
'python',
|
||||
'../tools//js2c.py',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/libraries.cc',
|
||||
'CORE',
|
||||
'<@(library_files)',
|
||||
'--startup_blob', '<@(libraries_bin_file)',
|
||||
'--nojs',
|
||||
],
|
||||
},
|
||||
{
|
||||
{
|
||||
'action_name': 'js2c_extras',
|
||||
'inputs': [
|
||||
'../tools//js2c.py',
|
||||
'../tools/js2c.py',
|
||||
'<@(v8_extra_library_files)',
|
||||
],
|
||||
'outputs': ['<(SHARED_INTERMEDIATE_DIR)/extras-libraries.cc'],
|
||||
'action': [
|
||||
'python',
|
||||
'../tools//js2c.py',
|
||||
'../tools/js2c.py',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/extras-libraries.cc',
|
||||
'EXTRAS',
|
||||
'<@(v8_extra_library_files)',
|
||||
],
|
||||
},
|
||||
{
|
||||
'action_name': 'js2c_extras_bin',
|
||||
'inputs': [
|
||||
'../tools//js2c.py',
|
||||
'<@(v8_extra_library_files)',
|
||||
],
|
||||
'outputs': ['<@(libraries_extras_bin_file)'],
|
||||
'action': [
|
||||
'python',
|
||||
'../tools//js2c.py',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/extras-libraries.cc',
|
||||
'EXTRAS',
|
||||
'<@(v8_extra_library_files)',
|
||||
'--startup_blob', '<@(libraries_extras_bin_file)',
|
||||
'--nojs',
|
||||
],
|
||||
},
|
||||
{
|
||||
'action_name': 'js2c_experimental_extras',
|
||||
'inputs': [
|
||||
'../tools//js2c.py',
|
||||
'../tools/js2c.py',
|
||||
'<@(v8_experimental_extra_library_files)',
|
||||
],
|
||||
'outputs': [
|
||||
@ -2584,31 +2522,14 @@
|
||||
],
|
||||
'action': [
|
||||
'python',
|
||||
'../tools//js2c.py',
|
||||
'../tools/js2c.py',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/experimental-extras-libraries.cc',
|
||||
'EXPERIMENTAL_EXTRAS',
|
||||
'<@(v8_experimental_extra_library_files)',
|
||||
],
|
||||
},
|
||||
{
|
||||
'action_name': 'js2c_experimental_extras_bin',
|
||||
'inputs': [
|
||||
'../tools//js2c.py',
|
||||
'<@(v8_experimental_extra_library_files)',
|
||||
],
|
||||
'outputs': ['<@(libraries_experimental_extras_bin_file)'],
|
||||
'action': [
|
||||
'python',
|
||||
'../tools//js2c.py',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/experimental-extras-libraries.cc',
|
||||
'EXPERIMENTAL_EXTRAS',
|
||||
'<@(v8_experimental_extra_library_files)',
|
||||
'--startup_blob', '<@(libraries_experimental_extras_bin_file)',
|
||||
'--nojs',
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
}, # js2c
|
||||
{
|
||||
'target_name': 'torque',
|
||||
'type': 'executable',
|
||||
@ -2667,7 +2588,7 @@
|
||||
'../src/torque/utils.cc',
|
||||
'../src/torque/utils.h',
|
||||
],
|
||||
},
|
||||
}, # torque_base
|
||||
{
|
||||
'target_name': 'v8_torque',
|
||||
'type': 'none',
|
||||
@ -2704,7 +2625,7 @@
|
||||
'action': ['<@(_inputs)', '-o', '<(SHARED_INTERMEDIATE_DIR)/torque-generated'],
|
||||
},
|
||||
],
|
||||
},
|
||||
}, # torque
|
||||
{
|
||||
'target_name': 'postmortem-metadata',
|
||||
'type': 'none',
|
||||
@ -2738,24 +2659,24 @@
|
||||
],
|
||||
},
|
||||
'actions': [
|
||||
{
|
||||
'action_name': 'gen-postmortem-metadata',
|
||||
'inputs': [
|
||||
'../tools//gen-postmortem-metadata.py',
|
||||
'<@(heapobject_files)',
|
||||
],
|
||||
'outputs': [
|
||||
'<(SHARED_INTERMEDIATE_DIR)/debug-support.cc',
|
||||
],
|
||||
'action': [
|
||||
'python',
|
||||
'../tools//gen-postmortem-metadata.py',
|
||||
'<@(_outputs)',
|
||||
'<@(heapobject_files)'
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
'action_name': 'gen-postmortem-metadata',
|
||||
'inputs': [
|
||||
'../tools/gen-postmortem-metadata.py',
|
||||
'<@(heapobject_files)',
|
||||
],
|
||||
'outputs': [
|
||||
'<(SHARED_INTERMEDIATE_DIR)/debug-support.cc',
|
||||
],
|
||||
'action': [
|
||||
'python',
|
||||
'../tools/gen-postmortem-metadata.py',
|
||||
'<@(_outputs)',
|
||||
'<@(heapobject_files)'
|
||||
],
|
||||
},
|
||||
],
|
||||
}, # postmortem-metadata
|
||||
{
|
||||
'target_name': 'mksnapshot',
|
||||
'type': 'executable',
|
||||
@ -2766,7 +2687,7 @@
|
||||
'v8_libplatform',
|
||||
'v8_nosnapshot',
|
||||
],
|
||||
'include_dirs+': [
|
||||
'include_dirs': [
|
||||
'..',
|
||||
'<(DEPTH)',
|
||||
],
|
||||
@ -2786,53 +2707,9 @@
|
||||
'toolsets': ['target'],
|
||||
}],
|
||||
],
|
||||
},
|
||||
}, # mksnapshot
|
||||
{
|
||||
'target_name': 'v8_dump_build_config',
|
||||
'type': 'none',
|
||||
'variables': {
|
||||
},
|
||||
'actions': [
|
||||
{
|
||||
'action_name': 'v8_dump_build_config',
|
||||
'inputs': [
|
||||
'../tools//testrunner/utils/dump_build_config_gyp.py',
|
||||
],
|
||||
'outputs': [
|
||||
'<(PRODUCT_DIR)/v8_build_config.json',
|
||||
],
|
||||
'action': [
|
||||
'python',
|
||||
'../tools//testrunner/utils/dump_build_config_gyp.py',
|
||||
'<(PRODUCT_DIR)/v8_build_config.json',
|
||||
'dcheck_always_on=<(dcheck_always_on)',
|
||||
'is_asan=<(asan)',
|
||||
'is_cfi=<(cfi_vptr)',
|
||||
'is_component_build=<(component)',
|
||||
'is_debug=<(CONFIGURATION_NAME)',
|
||||
# Not available in gyp.
|
||||
'is_gcov_coverage=0',
|
||||
'is_msan=<(msan)',
|
||||
'is_tsan=<(tsan)',
|
||||
# Not available in gyp.
|
||||
'is_ubsan_vptr=0',
|
||||
'target_cpu=<(target_arch)',
|
||||
'v8_enable_i18n_support=<(v8_enable_i18n_support)',
|
||||
'v8_enable_verify_predictable=<(v8_enable_verify_predictable)',
|
||||
'v8_target_cpu=<(v8_target_arch)',
|
||||
'v8_use_snapshot=<(v8_use_snapshot)',
|
||||
],
|
||||
'conditions': [
|
||||
['v8_target_arch=="mips" or v8_target_arch=="mipsel" \
|
||||
or v8_target_arch=="mips64" or v8_target_arch=="mips64el"', {
|
||||
'action':[
|
||||
'mips_arch_variant=<(mips_arch_variant)',
|
||||
'mips_use_msa=<(mips_use_msa)',
|
||||
],
|
||||
}],
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
'includes': [ 'v8_external_snapshot.gypi' ],
|
||||
}, # v8_external_snapshot
|
||||
],
|
||||
}
|
||||
|
120
deps/v8/gypfiles/v8_external_snapshot.gypi
vendored
Normal file
120
deps/v8/gypfiles/v8_external_snapshot.gypi
vendored
Normal file
@ -0,0 +1,120 @@
|
||||
# Keeping this separate since Node.js does use it
|
||||
{
|
||||
'target_name': 'v8_external_snapshot',
|
||||
'type': 'static_library',
|
||||
'conditions': [
|
||||
[ 'v8_use_external_startup_data==1', {
|
||||
'conditions': [
|
||||
['want_separate_host_toolset==1', {
|
||||
'toolsets': ['host', 'target'],
|
||||
'dependencies': [
|
||||
'mksnapshot#host',
|
||||
'js2c#host',
|
||||
'natives_blob',
|
||||
]}, {
|
||||
'toolsets': ['target'],
|
||||
'dependencies': [
|
||||
'mksnapshot',
|
||||
'js2c',
|
||||
'natives_blob',
|
||||
],
|
||||
}],
|
||||
['component=="shared_library"', {
|
||||
'defines': [
|
||||
'BUILDING_V8_SHARED',
|
||||
],
|
||||
'direct_dependent_settings': {
|
||||
'defines': [
|
||||
'USING_V8_SHARED',
|
||||
],
|
||||
},
|
||||
}],
|
||||
],
|
||||
'dependencies': [
|
||||
'v8_base',
|
||||
],
|
||||
'include_dirs+': [
|
||||
'..',
|
||||
'<(DEPTH)',
|
||||
],
|
||||
'sources': [
|
||||
'../src/setup-isolate-deserialize.cc',
|
||||
'../src/snapshot/embedded-empty.cc',
|
||||
'../src/snapshot/natives-external.cc',
|
||||
'../src/snapshot/snapshot-external.cc',
|
||||
],
|
||||
'actions': [
|
||||
{
|
||||
'action_name': 'run_mksnapshot (external)',
|
||||
'inputs': [
|
||||
'<(mksnapshot_exec)',
|
||||
],
|
||||
'variables': {
|
||||
'mksnapshot_flags': [],
|
||||
'conditions': [
|
||||
['v8_random_seed!=0', {
|
||||
'mksnapshot_flags': ['--random-seed', '<(v8_random_seed)'],
|
||||
}],
|
||||
['v8_vector_stores!=0', {
|
||||
'mksnapshot_flags': ['--vector-stores'],
|
||||
}],
|
||||
['v8_os_page_size!=0', {
|
||||
'mksnapshot_flags': ['--v8_os_page_size', '<(v8_os_page_size)'],
|
||||
}],
|
||||
],
|
||||
},
|
||||
'conditions': [
|
||||
['embed_script!=""', {
|
||||
'inputs': [
|
||||
'<(embed_script)',
|
||||
],
|
||||
}],
|
||||
['warmup_script!=""', {
|
||||
'inputs': [
|
||||
'<(warmup_script)',
|
||||
],
|
||||
}],
|
||||
['want_separate_host_toolset==1', {
|
||||
'target_conditions': [
|
||||
['_toolset=="host"', {
|
||||
'outputs': [
|
||||
'<(PRODUCT_DIR)/snapshot_blob_host.bin',
|
||||
],
|
||||
'action': [
|
||||
'<(mksnapshot_exec)',
|
||||
'<@(mksnapshot_flags)',
|
||||
'--startup_blob', '<(PRODUCT_DIR)/snapshot_blob_host.bin',
|
||||
'<(embed_script)',
|
||||
'<(warmup_script)',
|
||||
],
|
||||
}, {
|
||||
'outputs': [
|
||||
'<(PRODUCT_DIR)/snapshot_blob.bin',
|
||||
],
|
||||
'action': [
|
||||
'<(mksnapshot_exec)',
|
||||
'<@(mksnapshot_flags)',
|
||||
'--startup_blob', '<(PRODUCT_DIR)/snapshot_blob.bin',
|
||||
'<(embed_script)',
|
||||
'<(warmup_script)',
|
||||
],
|
||||
}],
|
||||
],
|
||||
}, {
|
||||
'outputs': [
|
||||
'<(PRODUCT_DIR)/snapshot_blob.bin',
|
||||
],
|
||||
'action': [
|
||||
'<(mksnapshot_exec)',
|
||||
'<@(mksnapshot_flags)',
|
||||
'--startup_blob', '<(PRODUCT_DIR)/snapshot_blob.bin',
|
||||
'<(embed_script)',
|
||||
'<(warmup_script)',
|
||||
],
|
||||
}],
|
||||
],
|
||||
},
|
||||
],
|
||||
}],
|
||||
],
|
||||
}
|
21
node.gypi
21
node.gypi
@ -122,21 +122,12 @@
|
||||
[ 'node_no_browser_globals=="true"', {
|
||||
'defines': [ 'NODE_NO_BROWSER_GLOBALS' ],
|
||||
} ],
|
||||
[ 'node_use_bundled_v8=="true" and v8_postmortem_support=="true"', {
|
||||
'conditions': [
|
||||
# -force_load is not applicable for the static library
|
||||
[ 'force_load=="true"', {
|
||||
'xcode_settings': {
|
||||
'OTHER_LDFLAGS': [
|
||||
'-Wl,-force_load,<(v8_base)',
|
||||
],
|
||||
},
|
||||
}],
|
||||
# when building with GN, the v8_monolith target already includes postmortem metadata
|
||||
[ 'build_v8_with_gn=="false"', {
|
||||
'dependencies': [ 'deps/v8/gypfiles/v8.gyp:postmortem-metadata' ],
|
||||
}],
|
||||
],
|
||||
[ 'node_use_bundled_v8=="true" and v8_postmortem_support=="true" and force_load=="true"', {
|
||||
'xcode_settings': {
|
||||
'OTHER_LDFLAGS': [
|
||||
'-Wl,-force_load,<(v8_base)',
|
||||
],
|
||||
},
|
||||
}],
|
||||
[ 'node_shared_zlib=="false"', {
|
||||
'dependencies': [ 'deps/zlib/zlib.gyp:zlib' ],
|
||||
|
Loading…
x
Reference in New Issue
Block a user