rust-lang / rust-lang/rust

Can we remove `unused` linker arguments to prevent linker message warning?

Open
#155,929 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

L-linker_messages needs-triage
Dominant language
Rust
Stars
119k
Forks
16.2k
PR merge metrics
PR metrics pending

Description

env: Rust nightly + -Zbuild-std + linker_messages

target aarch64-apple-watchos:
warning: linker stderr: clang: argument unused during compilation: '-pie' [-Wunused-command-line-argument]

target aarch64-pc-windows-gnullvm and x86_64-pc-windows-gnullvm
warning: linker stderr: clang: argument unused during compilation: '-nolibc' [-Wunused-command-line-argument]

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 reproducing the nightly -Zbuild-std build with linker_messages for the named watchOS and Windows GNU LLVM targets. Trace where target-specific linker arguments are assembled, then verify that the reported unused -pie and -nolibc warnings no longer occur while the builds still link successfully.

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
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.