Skip to content

build: separate host and target Rust artifacts in cross builds - #66823

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
inoway46:build-rust-cross-targets
Nov 9, 2026
Merged

nodejs-github-bot merged 1 commit into
nodejs:mainfrom
inoway46:build-rust-cross-targets

Conversation

@inoway46

@inoway46 inoway46 commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Bundled Temporal cross builds use a single Rust archive path for both host and target tools, so neither toolset links a matching archive.

This passes explicit Rust target triples to Cargo and builds each toolset into its own output directory:

  • target: CARGO_BUILD_TARGET (or the existing macOS x64 default)
  • host: the rustc -vV host triple, or its i686 counterpart for 32-bit host tools (CC_host="gcc -m32")

If the triples cannot be determined, Temporal support is disabled with a warning, or configure fails when --v8-enable-temporal-support is passed.

Verified with AArch64, RISC-V, and ARMv7 Make cross builds: the original failure reproduces before this change, and both archives link and run after it.

Fixes: #66897
Refs: #66803

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

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

@nodejs-github-bot nodejs-github-bot added 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 18, 2026
@inoway46

This comment was marked as outdated.

@inoway46

This comment was marked as outdated.

@inoway46
inoway46 force-pushed the build-rust-cross-targets branch from 19c9345 to 5ff420e Compare October 21, 2026 12:01
@inoway46
inoway46 marked this pull request as ready for review October 21, 2026 12:34
@inoway46

This comment was marked as resolved.

@inoway46
inoway46 force-pushed the build-rust-cross-targets branch from 5ff420e to 6555d9d Compare October 22, 2026 02:13
@inoway46
inoway46 marked this pull request as draft November 1, 2026 09:08
@inoway46
inoway46 force-pushed the build-rust-cross-targets branch 3 times, most recently from 815dcae to 7378d07 Compare November 2, 2026 09:43
@inoway46
inoway46 marked this pull request as ready for review November 2, 2026 10:12
@inoway46
inoway46 force-pushed the build-rust-cross-targets branch 2 times, most recently from 6478586 to 07ea604 Compare November 6, 2026 06:54
Capture the Rust target and host triples during configure for bundled
Temporal cross builds. Use explicit Cargo targets and separate output
directories so host and target archives do not share a build rule.

If the triples cannot be determined, disable Temporal with a warning
unless it was explicitly enabled.

Fixes: nodejs#66897
Refs: nodejs#66803
Assisted-by: Codex
Signed-off-by: inoway46 <inoueyuya416@gmail.com>
@legendecas

Copy link
Copy Markdown
Member

Triggering CI to verify cross compile: https://ci.nodejs.org/job/node-test-pull-request/78929/

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@legendecas legendecas added build Issues and PRs related to Node.js builds or CI infrastructure. author ready PRs with CI started, the required approvals, and no outstanding review comments. commit-queue PRs queued for automated landing through the Commit Queue. labels Nov 9, 2026
@nodejs-github-bot
nodejs-github-bot merged commit eb3ae47 into nodejs:main Nov 9, 2026
69 checks passed
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in eb3ae47

@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label Nov 9, 2026
aduh95 pushed a commit that referenced this pull request Nov 11, 2026
Capture the Rust target and host triples during configure for bundled
Temporal cross builds. Use explicit Cargo targets and separate output
directories so host and target archives do not share a build rule.

If the triples cannot be determined, disable Temporal with a warning
unless it was explicitly enabled.

Fixes: #66897
Refs: #66803
Assisted-by: Codex
Signed-off-by: inoway46 <inoueyuya416@gmail.com>
PR-URL: #66823
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. build Issues and PRs related to Node.js builds or CI infrastructure. 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.

build: Temporal cross builds do not separate host and target Rust archives

3 participants