Skip to content
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

clippy fails on missing eh_personality although panic-strategy is defined in custom target #2621

Closed
andre-richter opened this issue Apr 3, 2018 · 2 comments
Labels
C-bug Category: Clippy is not doing the correct thing I-ICE Issue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@andre-richter
Copy link
Member

When working with no_std crates that have a custom target, it is possible to to define "panic-strategy": "abort" in the custom target .json file, and xargo will happily compile your crate without a definition of the eh_personality lang item.

However, clippy will fail:

xargo clippy 
[...]
error: language item required, but not found: `eh_personality`

error: aborting due to previous error

One workaround is:

RUSTFLAGS="-C panic=abort" xargo clippy
Compiling core v0.0.0 ...

but that causes recompilation of core.
Another one would be adding the item to your source, although it is not needed.

I'm not really sure which of all the involved tools is the culprit here, I'm happy to raise the bug elsewhere if needed.

@oli-obk oli-obk added C-bug Category: Clippy is not doing the correct thing I-ICE Issue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️ labels Apr 3, 2018
@basil-cow
Copy link
Contributor

basil-cow commented Feb 2, 2020

This is a tad late, but maybe it will help someone who finds this via search. In order for xargo clippy to work with a custom target, you either do xargo clippy --target=your_target or set a default target in .cargo/config and invoke xargo clippy. Either that or I can't reproduce this bug ¯_(ツ)_/¯

@andre-richter
Copy link
Member Author

That actually makes sense, hehe.

Closing this since solution is now posted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Clippy is not doing the correct thing I-ICE Issue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

3 participants