fix: install Rust x86_64 target for darwin/amd64 cross-compilation#10
Merged
Conversation
The build-v8-deps workflow runs on macos-latest (arm64) for all darwin builds. When cross-compiling for darwin/amd64 (x86_64), V8's bundled Rust toolchain lacks the x86_64-apple-darwin target, so the temporal_rs Rust crate is silently skipped. This leaves 307 undefined _temporal_rs_* symbols in libv8-1.a, causing link failures in downstream consumers (e.g. er's release workflow). Fix: install system Rust with the x86_64-apple-darwin target and point V8's GN build at it via rust_sysroot_absolute. This ensures temporal_rs compiles for x86_64 during cross-compilation.
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.
Summary
build-v8-depsworkflow runs onmacos-latest(arm64) for all darwin builds. When cross-compiling for darwin/amd64, V8's bundled Rust toolchain lacks thex86_64-apple-darwintarget, so thetemporal_rsRust crate is silently skipped duringv8_monolithcompilation._temporal_rs_*FFI symbols inlibv8-1.a, causing linker failures (ld: symbol(s) not found for architecture x86_64) in downstream consumers — specificallyer's release workflow (Build (darwin/amd64)).rustupwith thex86_64-apple-darwintarget, then setrust_sysroot_absolutein GN args so V8's build uses it instead of the bundled toolchain.After merge
build-v8-depsworkflow (workflow_dispatch) to rebuild darwin/amd64 depslibv8-{0,1,2}.awill includetemporal_rssymbolser'sgo.modreplace directives to point to the new depsTest plan
build-v8-depsworkflow succeeds for darwin/amd64nm deps/darwin_amd64/libv8-1.a | grep ' U _temporal_rs_' | wc -lreturns 0errelease workflowBuild (darwin/amd64)passes with the new deps