Skip to content

LoongArch target features not supported by LLVM 19 are not handled properly #140455

@RalfJung

Description

@RalfJung

Since #138056 landed, every use of rustc built with LLVM 19 with a loongarch target shows a bunch of warnings about these target features not being supported -- no matter whether the target features are being used or not. From looking at the logic, I think this will affect stable builds as well.

This is not how things should work. As @taiki-e points out, the proper approach for this is to filter out these target features in to_llvm_features.

@heiher can you take care of this? Please also add a comment in target_feature.rs so that there's a higher chance someone can figure this out by themselves in the future.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-target-featureArea: Enabling/disabling target features like AVX, Neon, etc.C-bugCategory: This is a bug.O-loongarchTarget: LoongArch (LA32R, LA32S, LA64)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