mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05:00
build: use a single producer for shared generated files
Cross builds instantiate several shared generation actions in both toolsets, producing duplicate output rules that Ninja rejects. Register these actions once in the target toolset and explicitly share them with host consumers. Keep generator executables in the host toolset for cross builds. Refs: https://github.com/nodejs/node/issues/66803 Assisted-by: Codex Signed-off-by: inoway46 <inoueyuya416@gmail.com> PR-URL: https://github.com/nodejs/node/pull/66804 Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
This commit is contained in:
1 parent
708f09cf6a
commit
1099fe3b32
5 files changed
+38
-36
No files matched your search
Vendored
+1
-1
@@ -132,7 +132,7 @@
|
||||
# available to load it at runtime.
|
||||
'target_name': 'temporal_zoneinfo64_data',
|
||||
'type': 'none',
|
||||
'toolsets': ['host', 'target'],
|
||||
'toolsets': ['target'],
|
||||
'hard_dependency': 1,
|
||||
'direct_dependent_settings': {
|
||||
'sources': [
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
],
|
||||
'dependencies': [
|
||||
'<(protocol_tool_path)/inspector_protocol.gyp:crdtp',
|
||||
'<(v8_gypfiles_dir)/v8.gyp:v8_inspector_headers',
|
||||
'<(v8_gypfiles_dir)/v8.gyp:v8_inspector_headers#target',
|
||||
],
|
||||
'actions': [
|
||||
{
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
'v8.gyp:v8',
|
||||
'v8.gyp:v8_libbase',
|
||||
'v8.gyp:v8_libplatform',
|
||||
'v8.gyp:generate_bytecode_builtins_list',
|
||||
'v8.gyp:generate_bytecode_builtins_list#target',
|
||||
'v8.gyp:fp16',
|
||||
],
|
||||
# Generated source files need this explicitly:
|
||||
|
||||
+31
-29
@@ -101,9 +101,11 @@
|
||||
],
|
||||
}, # v8_pch
|
||||
{
|
||||
# Shared generated sources have one producer for both toolsets. In cross
|
||||
# builds, the executable used by this action still belongs to the host.
|
||||
'target_name': 'run_torque',
|
||||
'type': 'none',
|
||||
'toolsets': ['host', 'target'],
|
||||
'toolsets': ['target'],
|
||||
'conditions': [
|
||||
['want_separate_host_toolset', {
|
||||
'dependencies': ['torque#host'],
|
||||
@@ -191,8 +193,8 @@
|
||||
'toolsets': ['host', 'target'],
|
||||
'hard_dependency': 1,
|
||||
'dependencies': [
|
||||
'generate_bytecode_builtins_list',
|
||||
'run_torque',
|
||||
'generate_bytecode_builtins_list#target',
|
||||
'run_torque#target',
|
||||
'v8_base_without_compiler',
|
||||
'torque_runtime_support',
|
||||
'v8_maybe_icu',
|
||||
@@ -214,8 +216,8 @@
|
||||
'toolsets': ['host', 'target'],
|
||||
'hard_dependency': 1,
|
||||
'dependencies': [
|
||||
'generate_bytecode_builtins_list',
|
||||
'run_torque',
|
||||
'generate_bytecode_builtins_list#target',
|
||||
'run_torque#target',
|
||||
'v8_internal_headers',
|
||||
'v8_libbase',
|
||||
'v8_maybe_icu',
|
||||
@@ -236,7 +238,7 @@
|
||||
'target_name': 'generate_bytecode_builtins_list',
|
||||
'type': 'none',
|
||||
'hard_dependency': 1,
|
||||
'toolsets': ['host', 'target'],
|
||||
'toolsets': ['target'],
|
||||
'conditions': [
|
||||
['want_separate_host_toolset', {
|
||||
'dependencies': ['bytecode_builtins_list_generator#host'],
|
||||
@@ -277,8 +279,8 @@
|
||||
'type': 'static_library',
|
||||
'toolsets': ['host', 'target'],
|
||||
'dependencies': [
|
||||
'generate_bytecode_builtins_list',
|
||||
'run_torque',
|
||||
'generate_bytecode_builtins_list#target',
|
||||
'run_torque#target',
|
||||
'v8_base_without_compiler',
|
||||
'v8_initializers',
|
||||
'v8_maybe_icu',
|
||||
@@ -497,8 +499,8 @@
|
||||
}],
|
||||
['want_separate_host_toolset', {
|
||||
'dependencies': [
|
||||
'generate_bytecode_builtins_list',
|
||||
'run_torque',
|
||||
'generate_bytecode_builtins_list#target',
|
||||
'run_torque#target',
|
||||
'mksnapshot#host',
|
||||
'v8_maybe_icu',
|
||||
# [GYP] added explicitly, instead of inheriting from the other deps
|
||||
@@ -509,8 +511,8 @@
|
||||
]
|
||||
}, {
|
||||
'dependencies': [
|
||||
'generate_bytecode_builtins_list',
|
||||
'run_torque',
|
||||
'generate_bytecode_builtins_list#target',
|
||||
'run_torque#target',
|
||||
'mksnapshot',
|
||||
'v8_maybe_icu',
|
||||
# [GYP] added explicitly, instead of inheriting from the other deps
|
||||
@@ -631,8 +633,8 @@
|
||||
'v8_maybe_icu',
|
||||
'v8_shared_internal_headers',
|
||||
'v8_heap_base_headers',
|
||||
'generate_bytecode_builtins_list',
|
||||
'run_torque',
|
||||
'generate_bytecode_builtins_list#target',
|
||||
'run_torque#target',
|
||||
'v8_libbase',
|
||||
'fp16',
|
||||
],
|
||||
@@ -961,8 +963,8 @@
|
||||
'type': 'static_library',
|
||||
'toolsets': ['host', 'target'],
|
||||
'dependencies': [
|
||||
'generate_bytecode_builtins_list',
|
||||
'run_torque',
|
||||
'generate_bytecode_builtins_list#target',
|
||||
'run_torque#target',
|
||||
'v8_maybe_icu',
|
||||
'v8_base_without_compiler',
|
||||
'v8_internal_headers',
|
||||
@@ -983,8 +985,8 @@
|
||||
'type': 'static_library',
|
||||
'toolsets': ['host', 'target'],
|
||||
'dependencies': [
|
||||
'generate_bytecode_builtins_list',
|
||||
'run_torque',
|
||||
'generate_bytecode_builtins_list#target',
|
||||
'run_torque#target',
|
||||
'v8_internal_headers',
|
||||
'v8_maybe_icu',
|
||||
'v8_base_without_compiler',
|
||||
@@ -1019,8 +1021,8 @@
|
||||
'toolsets': ['host', 'target'],
|
||||
'hard_dependency': 1,
|
||||
'dependencies': [
|
||||
'generate_bytecode_builtins_list',
|
||||
'run_torque',
|
||||
'generate_bytecode_builtins_list#target',
|
||||
'run_torque#target',
|
||||
'v8_maybe_icu',
|
||||
],
|
||||
'conditions': [
|
||||
@@ -1044,7 +1046,7 @@
|
||||
{
|
||||
'target_name': 'v8_inspector_headers',
|
||||
'type': 'none',
|
||||
'toolsets': ['host', 'target'],
|
||||
'toolsets': ['target'],
|
||||
'hard_dependency': 1,
|
||||
'includes': ['inspector.gypi'],
|
||||
'direct_dependent_settings': {
|
||||
@@ -1102,13 +1104,13 @@
|
||||
'v8_bigint',
|
||||
'v8_headers',
|
||||
'v8_heap_base',
|
||||
'v8_inspector_headers',
|
||||
'v8_inspector_headers#target',
|
||||
'v8_libbase',
|
||||
'v8_shared_internal_headers',
|
||||
'v8_version',
|
||||
'cppgc_base',
|
||||
'generate_bytecode_builtins_list',
|
||||
'run_torque',
|
||||
'generate_bytecode_builtins_list#target',
|
||||
'run_torque#target',
|
||||
'v8_internal_headers',
|
||||
'v8_maybe_icu',
|
||||
'v8_zlib',
|
||||
@@ -1155,7 +1157,7 @@
|
||||
}],
|
||||
['v8_enable_i18n_support==0', {
|
||||
'dependencies': [
|
||||
'../../deps/crates/crates.gyp:temporal_zoneinfo64_data',
|
||||
'../../deps/crates/crates.gyp:temporal_zoneinfo64_data#target',
|
||||
],
|
||||
}],
|
||||
],
|
||||
@@ -1369,7 +1371,7 @@
|
||||
}],
|
||||
['v8_enable_i18n_support==1', {
|
||||
'dependencies': [
|
||||
'run_gen-regexp-special-case',
|
||||
'run_gen-regexp-special-case#target',
|
||||
],
|
||||
'sources': [
|
||||
'<(SHARED_INTERMEDIATE_DIR)/src/regexp/special-case.cc',
|
||||
@@ -2080,7 +2082,7 @@
|
||||
{
|
||||
'target_name': 'run_gen-regexp-special-case',
|
||||
'type': 'none',
|
||||
'toolsets': ['host', 'target'],
|
||||
'toolsets': ['target'],
|
||||
'conditions': [
|
||||
['want_separate_host_toolset', {
|
||||
'dependencies': ['gen-regexp-special-case#host'],
|
||||
@@ -2320,8 +2322,8 @@
|
||||
{
|
||||
'target_name': 'postmortem-metadata',
|
||||
'type': 'none',
|
||||
'toolsets': ['host', 'target'],
|
||||
'dependencies': ['run_torque'],
|
||||
'toolsets': ['target'],
|
||||
'dependencies': ['run_torque#target'],
|
||||
'variables': {
|
||||
'heapobject_files': [
|
||||
'<(SHARED_INTERMEDIATE_DIR)/torque-generated/instance-types.h',
|
||||
|
||||
@@ -36,8 +36,8 @@
|
||||
'dependencies': [
|
||||
'gen_heap_constants',
|
||||
|
||||
'v8.gyp:generate_bytecode_builtins_list',
|
||||
'v8.gyp:run_torque',
|
||||
'v8.gyp:generate_bytecode_builtins_list#target',
|
||||
'v8.gyp:run_torque#target',
|
||||
'v8.gyp:v8_maybe_icu',
|
||||
'v8.gyp:fp16',
|
||||
'v8.gyp:v8_libbase',
|
||||
@@ -161,8 +161,8 @@
|
||||
'v8.gyp:v8_libplatform',
|
||||
'v8.gyp:v8_maybe_icu',
|
||||
'v8.gyp:fp16',
|
||||
'v8.gyp:generate_bytecode_builtins_list',
|
||||
'v8.gyp:run_torque',
|
||||
'v8.gyp:generate_bytecode_builtins_list#target',
|
||||
'v8.gyp:run_torque#target',
|
||||
],
|
||||
'conditions': [
|
||||
['node_shared_abseil=="false"', {
|
||||
|
||||
Reference in new issue
Block a user