Skip to content

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

Open
inoway46 wants to merge 1 commit into
nodejs:mainfrom
inoway46:build-rust-cross-targets
Open

inoway46 wants to merge 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>
@inoway46
inoway46 force-pushed the build-rust-cross-targets branch from 07ea604 to d155703 Compare November 6, 2026 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

2 participants