Commit f8e9778
committed
Make #[used(linker)] the default on ELF too
#[used] currently is an alias for #[used(linker)] on all platforms
except ELF based ones where it is an alias for #[used(compiler)]. The
latter has surprising behavior and the LLVM LangRef explicitly states
that it "should only be used in rare circumstances, and should not be
exposed to source languages."
The reason #[used] still was an alias to #[used(compiler)] on ELF is
because the gold linker has issues with it. Luckily gold has been
deprecated with GCC 15 and seems to be unable to bootstrap rustc anyway.
As such we shouldn't really care about supporting gold.1 parent 95a2212 commit f8e9778
File tree
3 files changed
+13
-37
lines changed- compiler
- rustc_codegen_llvm/src
- rustc_codegen_ssa/src
- back
3 files changed
+13
-37
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
541 | 541 | | |
542 | 542 | | |
543 | 543 | | |
544 | | - | |
545 | | - | |
546 | | - | |
547 | | - | |
548 | | - | |
549 | | - | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
550 | 550 | | |
551 | 551 | | |
552 | 552 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1986 | 1986 | | |
1987 | 1987 | | |
1988 | 1988 | | |
1989 | | - | |
| 1989 | + | |
1990 | 1990 | | |
1991 | 1991 | | |
1992 | 1992 | | |
| |||
2020 | 2020 | | |
2021 | 2021 | | |
2022 | 2022 | | |
2023 | | - | |
| 2023 | + | |
| 2024 | + | |
2024 | 2025 | | |
2025 | 2026 | | |
2026 | 2027 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
227 | 202 | | |
228 | 203 | | |
229 | 204 | | |
| |||
0 commit comments