src: add a hard dependency v8_inspector_headers
A GYP hard dependency instructs GYP to not remove the dependency link between two static library targets in its generated output. This allows V8 dependents to include V8 inspector protocol headers. PR-URL: https://github.com/nodejs/node/pull/56805 Refs: https://github.com/nodejs/node/issues/53946 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
This commit is contained in:
parent
bf12d72faa
commit
297a4dd339
@ -2,6 +2,7 @@
|
||||
'variables': {
|
||||
'protocol_tool_path': '../../deps/inspector_protocol',
|
||||
'jinja_dir': '../../tools/inspector_protocol',
|
||||
'v8_gypfiles_dir': '../../tools/v8_gypfiles',
|
||||
'node_inspector_sources': [
|
||||
'src/inspector_agent.cc',
|
||||
'src/inspector_io.cc',
|
||||
@ -74,6 +75,7 @@
|
||||
],
|
||||
'dependencies': [
|
||||
'<(protocol_tool_path)/inspector_protocol.gyp:crdtp',
|
||||
'<(v8_gypfiles_dir)/v8.gyp:v8_inspector_headers',
|
||||
],
|
||||
'actions': [
|
||||
{
|
||||
|
@ -129,6 +129,8 @@
|
||||
'<(inspector_protocol_path)/crdtp/span.h',
|
||||
'<(inspector_protocol_path)/crdtp/status.cc',
|
||||
'<(inspector_protocol_path)/crdtp/status.h',
|
||||
|
||||
'<@(inspector_generated_sources)',
|
||||
],
|
||||
'v8_inspector_js_protocol': '<(V8_ROOT)/include/js_protocol.pdl',
|
||||
},
|
||||
@ -136,44 +138,4 @@
|
||||
'<(inspector_generated_output_root)',
|
||||
'<(inspector_protocol_path)',
|
||||
],
|
||||
'actions': [
|
||||
{
|
||||
'action_name': 'protocol_compatibility',
|
||||
'inputs': [
|
||||
'<(v8_inspector_js_protocol)',
|
||||
],
|
||||
'outputs': [
|
||||
'<@(inspector_generated_output_root)/src/js_protocol.stamp',
|
||||
],
|
||||
'action': [
|
||||
'<(python)',
|
||||
'<(inspector_protocol_path)/check_protocol_compatibility.py',
|
||||
'--stamp', '<@(_outputs)',
|
||||
'<@(_inputs)',
|
||||
],
|
||||
'message': 'Checking inspector protocol compatibility',
|
||||
},
|
||||
{
|
||||
'action_name': 'protocol_generated_sources',
|
||||
'inputs': [
|
||||
'<(v8_inspector_js_protocol)',
|
||||
'<(inspector_path)/inspector_protocol_config.json',
|
||||
'<@(inspector_protocol_files)',
|
||||
],
|
||||
'outputs': [
|
||||
'<@(inspector_generated_sources)',
|
||||
],
|
||||
'process_outputs_as_sources': 1,
|
||||
'action': [
|
||||
'<(python)',
|
||||
'<(inspector_protocol_path)/code_generator.py',
|
||||
'--jinja_dir', '<(V8_ROOT)/third_party',
|
||||
'--output_base', '<(inspector_generated_output_root)/src/inspector',
|
||||
'--config', '<(inspector_path)/inspector_protocol_config.json',
|
||||
'--config_value', 'protocol.path=<(v8_inspector_js_protocol)',
|
||||
'--inspector_protocol_dir', '<(inspector_protocol_path)',
|
||||
],
|
||||
'message': 'Generating inspector protocol sources from protocol json',
|
||||
},
|
||||
],
|
||||
}
|
||||
|
@ -1002,6 +1002,58 @@
|
||||
}],
|
||||
],
|
||||
}, # v8_compiler_for_mksnapshot
|
||||
{
|
||||
'target_name': 'v8_inspector_headers',
|
||||
'type': 'none',
|
||||
'toolsets': ['host', 'target'],
|
||||
'hard_dependency': 1,
|
||||
'includes': ['inspector.gypi'],
|
||||
'direct_dependent_settings': {
|
||||
'include_dirs': [
|
||||
'<(inspector_generated_output_root)/include',
|
||||
],
|
||||
},
|
||||
'actions': [
|
||||
{
|
||||
'action_name': 'protocol_compatibility',
|
||||
'inputs': [
|
||||
'<(v8_inspector_js_protocol)',
|
||||
],
|
||||
'outputs': [
|
||||
'<@(inspector_generated_output_root)/src/js_protocol.stamp',
|
||||
],
|
||||
'action': [
|
||||
'<(python)',
|
||||
'<(inspector_protocol_path)/check_protocol_compatibility.py',
|
||||
'--stamp', '<@(_outputs)',
|
||||
'<@(_inputs)',
|
||||
],
|
||||
'message': 'Checking inspector protocol compatibility',
|
||||
},
|
||||
{
|
||||
'action_name': 'protocol_generated_sources',
|
||||
'inputs': [
|
||||
'<(v8_inspector_js_protocol)',
|
||||
'<(inspector_path)/inspector_protocol_config.json',
|
||||
'<@(inspector_protocol_files)',
|
||||
],
|
||||
'outputs': [
|
||||
'<@(inspector_generated_sources)',
|
||||
],
|
||||
'process_outputs_as_sources': 1,
|
||||
'action': [
|
||||
'<(python)',
|
||||
'<(inspector_protocol_path)/code_generator.py',
|
||||
'--jinja_dir', '<(V8_ROOT)/third_party',
|
||||
'--output_base', '<(inspector_generated_output_root)/src/inspector',
|
||||
'--config', '<(inspector_path)/inspector_protocol_config.json',
|
||||
'--config_value', 'protocol.path=<(v8_inspector_js_protocol)',
|
||||
'--inspector_protocol_dir', '<(inspector_protocol_path)',
|
||||
],
|
||||
'message': 'Generating inspector protocol sources from protocol json',
|
||||
},
|
||||
],
|
||||
}, # v8_inspector_headers
|
||||
{
|
||||
'target_name': 'v8_base_without_compiler',
|
||||
'type': 'static_library',
|
||||
@ -1011,6 +1063,7 @@
|
||||
'v8_bigint',
|
||||
'v8_headers',
|
||||
'v8_heap_base',
|
||||
'v8_inspector_headers',
|
||||
'v8_libbase',
|
||||
'v8_shared_internal_headers',
|
||||
'v8_version',
|
||||
|
Loading…
x
Reference in New Issue
Block a user