rust-lang / rust-lang/rust

Request for `tune-cpu` code generation option to be promoted to stable

Open
#127,961 5 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-CLI A-targets T-compiler
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

I'm raising this issue as I couldn't find an existing tracking issue for the tune-cpu code generation option being stabilized - and I would like it to be.

A common use of target-cpu is to specify the oldest type of CPU an application supports. This will unfortunately result in a binary tuned for that specific CPU - since by default tune-cpu picks up the value from target-cpu. I would like to be able to use tune-cpu=generic to resolve this without needing to use the nightly compiler.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the rustc codegen-options documentation linked in the issue, especially the tune-cpu entry, and trace how its stability is tracked in the compiler. Compare the requested stable tune-cpu=generic behavior with the current target-cpu defaulting behavior. Done means the option is stabilized with appropriate compiler coverage and documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.