rust/compiler/rustc_codegen_llvm/src
bors cf423712b9 Auto merge of #140872 - bjorn3:elf_use_used_linker, r=nikic
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." [^2]

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 [^1] and seems to be unable to bootstrap rustc anyway [^3]. As such we shouldn't really care about supporting gold.

This would also allow re-enabling start-stop-gc with lld.

cc https://github.com/rust-lang/rust/issues/93798
Likely fixes https://github.com/rust-lang/rust/issues/85045

[^1]: https://lists.gnu.org/archive/html/info-gnu/2025-02/msg00001.html
[^2]: https://llvm.org/docs/LangRef.html#the-llvm-compiler-used-global-variable
[^3]: https://github.com/rust-lang/rust/issues/139425
2025-06-05 22:52:17 +00:00
..
back Mark all optimize methods and the codegen method as safe 2025-05-28 20:55:00 +00:00
builder add custom enzyme markers to target methods 2025-04-25 11:09:52 +05:30
coverageinfo Remove methods from StaticCodegenMethods that are not called in cg_ssa itself 2025-05-28 20:55:00 +00:00
debuginfo Change tag_field to FieldIdx in Variants::Multiple 2025-06-03 23:42:21 -07:00
llvm get rid of rustc_codegen_ssa::common::AtomicOrdering 2025-05-28 22:57:55 +02:00
abi.rs Rollup merge of #141569 - workingjubilee:canonicalize-abi, r=bjorn3 2025-06-03 21:53:36 +02:00
allocator.rs Remove implicit #[no_mangle] for #[rustc_std_internal_symbol] 2025-03-17 14:08:09 +00:00
asm.rs Flatten control-flow in inline_asm_call after verification 2025-05-11 14:38:42 +10:00
attributes.rs don't depend on rustc_attr_parsing if rustc_data_structures will do 2025-05-09 23:16:55 +02:00
base.rs Make predefine methods take &mut self 2025-05-28 20:55:00 +00:00
builder.rs Remove type_test from IntrinsicCallBuilderMethods 2025-06-03 10:00:56 +00:00
callee.rs don't depend on rustc_attr_parsing if rustc_data_structures will do 2025-05-09 23:16:55 +02:00
common.rs Rename OperandBundleOwned to OperandBundleBox 2025-05-11 21:21:38 +10:00
consts.rs Auto merge of #140872 - bjorn3:elf_use_used_linker, r=nikic 2025-06-05 22:52:17 +00:00
context.rs Auto merge of #139385 - joboet:threadlocal_address, r=nikic 2025-05-30 15:39:56 +00:00
declare.rs Make allocator shim creation mostly use safe code 2025-02-24 15:11:29 +00:00
errors.rs KCFI: Add KCFI arity indicator support 2025-04-05 04:05:04 +00:00
intrinsic.rs Remove type_test from IntrinsicCallBuilderMethods 2025-06-03 10:00:56 +00:00
lib.rs Mark all optimize methods and the codegen method as safe 2025-05-28 20:55:00 +00:00
llvm_util.rs add s390x z17 target features 2025-05-19 17:40:37 +02:00
mono_item.rs Make predefine methods take &mut self 2025-05-28 20:55:00 +00:00
type_.rs remove noinline attribute and add alwaysinline after AD pass 2025-04-28 21:10:32 +05:30
type_of.rs rename BackendRepr::Vector → SimdVector 2025-02-28 17:17:45 +01:00
va_arg.rs implement va_arg for powerpc 2025-06-01 00:51:01 +02:00
value.rs Add warn(unreachable_pub) to rustc_codegen_llvm. 2024-08-16 08:46:57 +10:00