Repository navigation
build: separate host and target Rust artifacts in cross builds - #66823
Merged
Merged
Conversation
Collaborator
|
Review requested:
|
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
inoway46
force-pushed
the
build-rust-cross-targets
branch
from
October 21, 2026 12:01
19c9345 to
5ff420e
Compare
inoway46
marked this pull request as ready for review
October 21, 2026 12:34
This comment was marked as resolved.
This comment was marked as resolved.
inoway46
force-pushed
the
build-rust-cross-targets
branch
from
October 22, 2026 02:13
5ff420e to
6555d9d
Compare
inoway46
marked this pull request as draft
November 1, 2026 09:08
inoway46
force-pushed
the
build-rust-cross-targets
branch
3 times, most recently
from
November 2, 2026 09:43
815dcae to
7378d07
Compare
inoway46
marked this pull request as ready for review
November 2, 2026 10:12
inoway46
force-pushed
the
build-rust-cross-targets
branch
2 times, most recently
from
November 6, 2026 06:54
6478586 to
07ea604
Compare
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
force-pushed
the
build-rust-cross-targets
branch
from
November 6, 2026 08:50
07ea604 to
d155703
Compare
Member
|
Triggering CI to verify cross compile: https://ci.nodejs.org/job/node-test-pull-request/78929/ |
Collaborator
legendecas
approved these changes
Nov 9, 2026
Collaborator
|
Landed in eb3ae47 |
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>
aduh95
pushed a commit
that referenced
this pull request
Nov 12, 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>
aduh95
pushed a commit
that referenced
this pull request
Nov 12, 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>
wszgrcy
added a commit
to wszgrcy/GodotJS-Dependencies
that referenced
this pull request
Nov 18, 2026
The macOS x86_64 bundle failed its own link check: ld ignored every Rust object with "found architecture 'arm64', required architecture 'x86_64'", so Temporal's symbols were missing. The build was fine - x86_64-apple-darwin objects were built, and the node link used them. Packaging copied the wrong file. A cross build keeps two copies of some archives. Node's per-toolset Rust change (nodejs/node#66823, which we apply) builds the Temporal crate once per toolset into gen/cargo/host/... and gen/cargo/target/..., and host-toolset output in general sits under gen.host / obj.host. copy_fat searched by name and took the first hit, which on that layout is the arm64 crate - it went into macos.x86_64.release and the failure surfaced in a later step that had nothing to do with packaging. package_node.sh now: locate_archive lists every file with that name, puts the ones that look like host-toolset output last, and where the machine can tell (lipo, so macOS) picks the copy that actually holds the architecture being packaged. The candidate list and the winner are printed, because a CI log is the only place this can be read afterwards. arch_state reads lipo's answer for the architecture part only, so a path containing "macos.x86_64.release" cannot make an arm64 archive look correct. Unknown arch names, missing lipo, and archives lipo cannot read are all left alone rather than guessed at. check_arch the copied file still has to hold that architecture; if it does not, packaging stops and says which copy was taken. The per-archive log line now names the source path instead of the bare name. Release asset names are one shape now. The build directory is macos.arm64.release but windows_x86_64_release, so the files came out as node_..._macos.arm64.tar.zst next to node_..._windows_x86_64.tar.zst; dots become underscores, so every asset is node_<version>_<platform>_<arch>.tar.zst in both workflow files. Verified: 20 checks in a stand-in tree (crate taken from the target toolset, gen.host loses to obj, a name that exists only in gen.host is still found, a missing name still fails, the log lists candidates and names the winner without leaking into the path, lipo answers read as expected for thin/fat/unreadable archives, the path mentioning x86_64 does not excuse arm64 objects, and with a lipo stand-in the architecture overrules the file-name guess in both directions). Linux packaging of the real tree is byte-identical to the bundle made before this change, including manifest and all 37 archives, and the log now shows the source path of each. Both workflow files parse as YAML, every step passes bash -n, and build_all's packaging step run as extracted turns macos.arm64.release and linux_x86_64_release into node_26.13.1_macos_arm64.tar.zst and node_26.13.1_linux_x86_64.tar.zst.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
CARGO_BUILD_TARGET(or the existing macOS x64 default)rustc -vVhost triple, or itsi686counterpart 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-supportis 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