Skip to content

Codegen features are no longer recognized by rustc #96472

Open
@a1phyr

Description

@a1phyr

On stable, giving additional codegen features to rustc works as expected, for example:

$ rustc --target=wasm32-unknown-unknown -C target-feature=+bulk-memory test.rs --crate-type=cdylib

On beta and nightly, compiling with the same options works too, but warns that the feature is not recognized.

$ rustc +nightly --target=wasm32-unknown-unknown -C target-feature=+bulk-memory test.rs --crate-type=cdylib
warning: unknown feature specified for `-Ctarget-feature`: `bulk-memory`
  |
  = note: it is still passed through to the codegen backend
  = note: consider filing a feature request

warning: 1 warning emitted

Target features work well.
This may be caused by #95202.

Version it worked on

It most recently worked on: 1.60

Version with regression

Beta (1.61)

rustc --version --verbose:

rustc 1.61.0-beta.4 (69a6d12e9 2022-04-25)
binary: rustc
commit-hash: 69a6d12e9f0372e3c6d82bc7c7e410dab02d0500
commit-date: 2022-04-25
host: x86_64-unknown-linux-gnu
release: 1.61.0-beta.4
LLVM version: 14.0.0

@rustbot modify labels: +regression-from-stable-to-beta -regression-untriaged

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.D-confusingDiagnostics: Confusing error or lint that should be reworked.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