Skip to content

Use cfg(target_has_atomic) instead of hard coding which targets support atomics #1033

Closed
@bjorn3

Description

@bjorn3

This has been stable since 1.60.0: rust-lang/rust#93824 The hard coded list is bound to go out of sync with rustc, especially when new targets get added. As rustc itself depends on crossbeam, this means it isn't possible to build rustc for targets lacking some atomics until a new crossbeam release with those new targets. Using cfg(target_has_atomic) will immediately work. While the MSRV of crossbeam is lower than 1.60.0, it should be possible to use the hard coded list as fallback when the rustc version is too old for stable cfg(target_has_atomic).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions