-
Notifications
You must be signed in to change notification settings - Fork 231
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
update toolchain to 2025-02-22 #634
base: main
Are you sure you want to change the base?
Conversation
1a0f125
to
d4538ec
Compare
I'd like to phone a friend (@Patryk27) When I build locally I get an error like I'm not sure where symbols.o comes from. Maybe we need to (somehow) pass extra flags when building the It appears the my versions
|
Yes, this is supposed to be done automatically by rustc: I'll take a look later at what's going on here! |
.github/workflows/ci.yml
Outdated
- name: Test-compile HAL crate for an MCU | ||
if: "${{ matrix.m.type == 'mcu' }}" | ||
run: cd "mcu/${{ matrix.m.crate }}" && cargo build --features "${{ matrix.m.name }}" -Z build-std=core --target "../../avr-specs/avr-${{ matrix.m.spec }}.json" | ||
run: cd "mcu/${{ matrix.m.crate }}" && cargo build --release --features "${{ matrix.m.name }}" -Z build-std=core |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't we have something like --target=avr-none -C target-cpu={{matrix.something}}
in here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, with avr-none
being upstream now, we should start making use of it everywhere. I do wonder, however, what to do with the other target spec changes we currently do:
avr-hal/avr-specs/sync-from-upstream.py
Lines 57 to 64 in d1782c6
COMMON = { | |
# needed because we currently rely on avr-libc | |
"no-default-libraries": False, | |
# 8-bit operations on AVR are atomic | |
# LLVM also supports 16-bit atomics by disabling interrupts | |
# see also https://github.com/rust-lang/rust/pull/114495 | |
"max-atomic-width": 16, | |
} |
avr-hal/avr-specs/sync-from-upstream.py
Line 103 in d1782c6
pre_link_args.append("-Wl,--as-needed,--print-memory-usage") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
max-atomic-width
is already set to 16:
I'm not sure on no-default-libraries
, though - gotta look at it.
As for the extra link arguments, they can be always passed via RUSTFLAGS
(e.g. through .cargo/config
) or even through a build.rs
script (cargo:rustc-link-arg
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried adding -C default-linker-libraries
to Cargo.toml for one of the problematic cpus and while it removed the -nodefaultlibs
argument from the avr-gcc
invocation the linker error remains.
This change bumps the toolchain to a recent nightly that incorporates LLVM codegen improvements and avr-none target.
Much thanks to @Patryk27 for all your hard work
closes #537