rust-lang / rust-lang/rust

The default values for TargetOption violate the target consistency check

Open
#133,459 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-target-specs A-targets C-bug T-compiler
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

TargetOption defaults to relocation_model: Pic and dynamic_linking: false and position_independent_executables: false. However, our consistency check says that this is an invalid combination of options.

So it seems we should either fix our defaults, or the consistency check is a bit overzealous?

This check was added in https://github.com/rust-lang/rust/pull/100537, Cc @petrochenkov @oli-obk

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 by locating TargetOption and the target consistency check introduced in pull request 100537. Compare the defaults for relocation_model, dynamic_linking, and position_independent_executables with the check's rules, then determine whether the defaults or the check should change; the work is done when the default combination passes consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.