Skip to content

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

Closed
@andre-richter

Description

@andre-richter

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: Clippy is not doing the correct thingI-ICEIssue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions