Skip to content

Conversation

NobodyXu
Copy link
Collaborator

Fixed #1552

@NobodyXu NobodyXu enabled auto-merge (squash) September 25, 2025 10:13
@NobodyXu NobodyXu merged commit 6d3e241 into main Sep 25, 2025
157 checks passed
@NobodyXu NobodyXu deleted the NobodyXu-patch-1 branch September 25, 2025 10:16
@Vollbrecht
Copy link

Vollbrecht commented Sep 25, 2025

@NobodyXu thanks for fixing that stuff. A bit of background i may add here. The espressif provided C toolchain did go through some naming schema changes. E.g starting with 13.2.0 they introduced a multilib for all xtensa targets. Previously it was needed to specifically call xtensa-esp32s3-elf xtensa-esp32s2-elf etc.

But since then this should not be needed anymore technically. They still provided wrappers for the "old" naming convention and ship them. They are actually "rust" wrapper to make it extra fun if you have a look here.

So with respect to the fix i am not so sure if hard-coding this in the long run is even the correct thing here. I think something with OP's setup was otherwise wonky, e.g explicitly hard coding this stuff now is not a proper fix.

Still thank you for your work on the cc crate. =)

If you run into problems with the xtensa / riscv espressif targets feel free to ping me or @ivmarkov in the future btw.

@NobodyXu
Copy link
Collaborator Author

That'd be great!

i can update https://github.com/rust-lang/cc-rs/blob/main/src/lib.rs#L3459 to have this prefix, and then fallback to the old name if the new name doesn't exist.

cc @Vollbrecht what if the new name of the compiler?

@sansmoraxz
Copy link
Contributor

@NobodyXu isn't it better to put the toolchain name in fn prefix_for_target?

This approach would make growing the function too clunky. As there are other compiler targets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CC not resolve to correct arch for xtensa espidf arch by default even if explicitly build targetted
3 participants