-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
[bug] Incorrect llvm target #3285
Comments
The llvm target misidentified the arch on apple silicon, causing sidecar bundling to fail. This fixes #3285.
We need runtime check because the binary-releases repo does not compile the CLI for all archs, so cfg!() doesn't help us here. |
I also realized the cargo env vars don't help at all, because we resolve the arch before we enter the cargo build context, so those env vars aren't set anyway. Have a look at the PR though, we can use a different property on that json object. |
Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
Thanks a ton. I ran into this the other day as well and look now it's fixed! |
The magic of bug fixes 😁 |
Describe the bug
tauri/tooling/bundler/src/bundle/platform.rs
Lines 27 to 30 in 9bb6897
This line uses the rust compiler to identify the current target arch, which is problematic for two reasons:
arm64-apple-macosx11.0.0
(it even identifies my colleagues macbook asx86_64-apple-macosx10.12.0
)Reproduction
RUSTC_BOOTSTRAP=1 rustc -Z unstable-options --print target-spec-json
Expected behavior
It should correctly identify the current target as
aarch64
(thearch
property of the same json object even correctly statesaarch64
).Platform and versions
Stack trace
No response
Additional context
We should use
rustc --print cfg
instead ofRUSTC_BOOTSTRAP=1 rustc -Z unstable-options --print target-spec-json
or even remove the whole command and just use thecfg!
macros insteadThe text was updated successfully, but these errors were encountered: