-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Install aarch64-apple-darwin target of Rust toolchain for cross-compile #340
Comments
Thanks I had forgotten. fixed it now here: https://github.com/r-universe-org/build-and-check/commit/4fe6f6e43031da9462c4d08dc3db90fee24ea5dd It looks like string2path now passes: https://github.com/r-universe/yutannihilation/actions/runs/7446364778/job/20256571487 In order to help packages that simply call
However this resulted in an error Do you know if there is a way to tell rustup/cargo to target by default |
Oh, cool!!! Thanks so much.
Yes, ❯ rustup default -h
rustup.exe-default
Set the default toolchain
It seems there are no handy way for target like [build]
target = "aarch64-apple-darwin" c.f. https://stackoverflow.com/questions/49453571/how-can-i-set-default-build-target-for-cargo Or, setting I'm not sure if this affects the location of the artifact, which accordingly requires users to tweak |
Hmm, it seems both ways cause this and there's no way to handle the change of the location of the artifact transparently. There are several proposals related to this (e.g. rust-lang/cargo#6100, rust-lang/rfcs#3371), but, at the moment, the package needs to be cross-compile-aware. I doubt arm64 macOS runners become available soon, considering they have repeatedly delayed the roadmap (c.f. actions/runner-images#2187). But, ultimately, the crosss-compile is a temporary workaround until it eventually comes. So, IMHO, it's fine to impose the effort to package authors at this stage. |
I found a hack to make it work I think. I added the following shim (wrapper) for cargo to the PATH on the macos cross environment: https://github.com/r-universe-org/prepare-macos/blob/master/shims/cargo.sh The shim both overrides the default target and then copies the |
Looks good to me! |
I saw this comment and tried to cross-compile my Rust-powered package for arm64 macOS.
#97 (comment)
But, it currently fails because the R-universe's runner doesn't have
aarch64-apple-darwin
target installed.https://github.com/r-universe/yutannihilation/actions/runs/7442778977/job/20246753858
Is it possible to make the target available for builds that use Rust? Just like the case of the GNU toolchain on Windows, we can probably run
rustup add
inMakevars
, but it's nice if it's pre-installed.The text was updated successfully, but these errors were encountered: