Skip to content

Add a test ensuring all our targets set the features required by their ABI. #136208

Open
@RalfJung

Description

@RalfJung

With #136147, we emit a warning (and hopefully eventually a hard error) when a target does not enable all the target features required by the declared ABI, or when it enables a target feature incompatible with the declared ABI. Ideally, we'd ensure that all built-in targets pass this test, but that is non-trivial: we need to actually generate an LLVM TargetMachine for the target and ask LLVM about the enabled target features and then check that against our ABI compatibility list. I'm not sure how to best write such a test.

It could be a ui test compiling an empty program, with a revision for each target, but that seems annoying... I'd prefer something that iterates over all targets automatically, rather than having to list all targets in some ui test.

Cc @workingjubilee @rust-lang/wg-llvm

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ABIArea: Concerning the application binary interface (ABI)A-testsuiteArea: The testsuite used to check the correctness of rustcC-enhancementCategory: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions