diff options
| author | The Miri Cronjob Bot <miri@cron.bot> | 2025-06-06 05:02:49 +0000 |
|---|---|---|
| committer | The Miri Cronjob Bot <miri@cron.bot> | 2025-06-06 05:02:49 +0000 |
| commit | c44bc10b67939cc96a2e1c32c352beaaedb95d1b (patch) | |
| tree | 8e2d7a7fe4590bf066323a503a4a17290a353f47 /compiler/rustc_codegen_llvm/src | |
| parent | 8c410ca291a68bf23ca3694b1bbda631323b12cd (diff) | |
| parent | d945c8562b49df98af25ed43b41bdbc59b8385cc (diff) | |
| download | rust-c44bc10b67939cc96a2e1c32c352beaaedb95d1b.tar.gz rust-c44bc10b67939cc96a2e1c32c352beaaedb95d1b.zip | |
Merge from rustc
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/consts.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/rustc_codegen_llvm/src/consts.rs b/compiler/rustc_codegen_llvm/src/consts.rs index 4234352c93a..73def2711dc 100644 --- a/compiler/rustc_codegen_llvm/src/consts.rs +++ b/compiler/rustc_codegen_llvm/src/consts.rs @@ -541,12 +541,12 @@ impl<'ll> CodegenCx<'ll, '_> { // in the handling of `.init_array` (the static constructor list) in versions of // the gold linker (prior to the one released with binutils 2.36). // - // That said, we only ever emit these when compiling for ELF targets, unless - // `#[used(compiler)]` is explicitly requested. This is to avoid similar breakage - // on other targets, in particular MachO targets have *their* static constructor - // lists broken if `llvm.compiler.used` is emitted rather than `llvm.used`. However, - // that check happens when assigning the `CodegenFnAttrFlags` in - // `rustc_hir_analysis`, so we don't need to take care of it here. + // That said, we only ever emit these when `#[used(compiler)]` is explicitly + // requested. This is to avoid similar breakage on other targets, in particular + // MachO targets have *their* static constructor lists broken if `llvm.compiler.used` + // is emitted rather than `llvm.used`. However, that check happens when assigning + // the `CodegenFnAttrFlags` in the `codegen_fn_attrs` query, so we don't need to + // take care of it here. self.add_compiler_used_global(g); } if attrs.flags.contains(CodegenFnAttrFlags::USED_LINKER) { |
