rust/compiler/rustc_codegen_ssa
Jonathan Brouwer da9292bcdf
Rollup merge of #152793 - mati865:disable-no-pie-on-windows, r=petrochenkov
Do no add -no-pie on Windows

Windows binaries are always position independent and Clang warns when trying to enable or disable that:
```
❯ clang hello.c -pie
clang: warning: argument unused during compilation: '-pie' [-Wunused-command-line-argument]

❯ clang hello.c -no-pie
clang: warning: argument unused during compilation: '-no-pie' [-Wunused-command-line-argument]
```

https://github.com/rust-lang/rust/pull/149937 will turn these warnings into build errors:
```
❯ cargo rustc -- -D linker-messages
   Compiling hello v0.1.0 (E:\tmp\hello)
error: linker stderr: x86_64-w64-mingw32-clang: argument unused during compilation: '-nolibc' [-Wunused-command-line-argument]␍
       x86_64-w64-mingw32-clang: argument unused during compilation: '-no-pie' [-Wunused-command-line-argument]␍

  |
  = note: requested on the command line with `-D linker-messages`

error: could not compile `hello` (bin "hello") due to 1 previous error
```
2026-02-18 18:55:21 +01:00
..
src Rollup merge of #152793 - mati865:disable-no-pie-on-windows, r=petrochenkov 2026-02-18 18:55:21 +01:00
Cargo.toml Port rustc_expected_cgu_reuse to the new attribute parser 2026-02-10 10:10:38 +01:00
README.md mv compiler to compiler/ 2020-08-30 18:45:07 +03:00

Please read the rustc-dev-guide chapter on Backend Agnostic Codegen.