Skip to content

build: use a single producer for shared generated files - #66804

Open
inoway46 wants to merge 1 commit into
nodejs:mainfrom
inoway46:build-shared-generation-producers
Open

inoway46 wants to merge 1 commit into
nodejs:mainfrom
inoway46:build-shared-generation-producers

Conversation

@inoway46

@inoway46 inoway46 commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Cross builds register duplicate rules for shared generated files, causing Ninja errors and Make recipe override warnings.

ninja: error: obj.host/tools/v8_gypfiles/v8_inspector_headers.ninja:14: multiple rules generate gen/inspector-generated-output-root/src/js_protocol.stamp

Keep one producer in the target toolset and make both toolsets depend on it explicitly. For example, when cross-compiling:

Before:
  run_torque#host   ──┐
                     ├──> same output paths (duplicate producers)
  run_torque#target ──┘

After:
  run_torque#target ─────> shared outputs used by both toolsets

In both cases, the generator executable is torque#host. Rust archive generation is unchanged.

Focused validation passed for native x64 and RISC-V cross builds with both Ninja and Make, with Temporal disabled. Checks cover producer uniqueness, dependencies, file generation, and compilation of representative generated sources.

Refs: #66803 (comment)

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: nodejs#66803
Assisted-by: Codex
Signed-off-by: inoway46 <inoueyuya416@gmail.com>
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/gyp
  • @nodejs/inspector
  • @nodejs/security-wg
  • @nodejs/v8-update

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs involving general changes in the lib/ or src/ directories. needs-ci PRs that need a full CI run. labels Oct 17, 2026
@inoway46
inoway46 marked this pull request as ready for review October 17, 2026 06:26
@inoway46 inoway46 added the build Issues and PRs related to Node.js builds or CI infrastructure. label Oct 17, 2026
@inoway46
inoway46 requested a review from legendecas November 1, 2026 09:17
@legendecas

legendecas commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Starting https://ci.nodejs.org/job/node-test-pull-request/78818/ to verify with cross compile profiles.

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Issues and PRs related to Node.js builds or CI infrastructure. c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs involving general changes in the lib/ or src/ directories. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants