work around x64 dist on ARM64 Windows being treated as a cross-compile - #340
Merged
sunshowers merged 1 commit intoSep 27, 2026
Conversation
wfchandler
approved these changes
Sep 23, 2026
wfchandler
left a comment
Collaborator
There was a problem hiding this comment.
Thanks! I have no complaints
Collaborator
|
@sunshowers the macOS CI failures should be fixed on main, do you mind rebasing? |
Author
Revision history
Generated by jj-stack from this pull request's force-push history. |
sunshowers
force-pushed
the
jj-stack/work-around-x64-dist-on-arm64-windows-being-treated-as-a-cross-compile-xsutrouu
branch
3 times, most recently
from
September 26, 2026 23:46
e3cde77 to
275f269
Compare
See inline comments for more information. The root issue is that dist appears to confuse the host platform with the platform it was built for. The two are usually the same but are not in case of x86_64 binaries running on ARM64 under emulation. Work around this for now in lieu of fixing up all of dist. We do not ship an ARM64 binary for dist itself yet -- doing so will probably require other fixes, including to binary signing.
sunshowers
force-pushed
the
jj-stack/work-around-x64-dist-on-arm64-windows-being-treated-as-a-cross-compile-xsutrouu
branch
from
September 26, 2026 23:50
275f269 to
55a0b3a
Compare
sunshowers
commented
Sep 27, 2026
Comment on lines
+238
to
+251
| if Self::is_repo_root(git, repo_dir)? { | ||
| eprintln!("repo already cloned, updating it..."); | ||
| std::env::set_current_dir(repo_dir).into_diagnostic()?; | ||
| git.output_checked(|c| c.arg("remote").arg("set-url").arg("origin").arg(repo_url))?; | ||
| git.output_checked(|c| c.arg("fetch").arg("origin").arg(commit_sha).arg("--tags"))?; | ||
| git.output_checked(|c| c.arg("reset").arg("--hard").arg("FETCH_HEAD"))?; | ||
| } else { | ||
| if repo_dir.exists() { | ||
| // rust-cache strips files but keeps dirs under target/, leaving | ||
| // a .git skeleton -- git would then operate on the enclosing | ||
| // checkout. | ||
| eprintln!("{repo_dir} exists but is not a git repo root, removing it..."); | ||
| axoasset::LocalAsset::remove_dir_all(repo_dir)?; | ||
| } |
Author
There was a problem hiding this comment.
FYI @wfchandler made some fixes to fix CI with cached artifacts.
sunshowers
deleted the
jj-stack/work-around-x64-dist-on-arm64-windows-being-treated-as-a-cross-compile-xsutrouu
branch
September 27, 2026 00:16
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.
See inline comments for more information.
The root issue is that dist appears to confuse the host platform with the platform it was built for. The two are usually the same but are not in case of x86_64 binaries running on ARM64 under emulation. Work around this for now, in lieu of fixing up all of dist.
We do not ship an ARM64 binary for dist itself yet -- doing so will probably require other fixes, including to binary signing.