rust/compiler/rustc_codegen_ssa/src/back
bors 7d49ae9731 Auto merge of #136410 - saethlin:clean-up-cgu-internal-copy, r=compiler-errors
Remove InstanceKind::generates_cgu_internal_copy

This PR should not contain any behavior changes. Before this PR, the logic for selecting instantiation mode is spread across all of
* `instantiation_mode`
* `cross_crate_inlinable`
* `generates_cgu_internal_copy`
* `requires_inline`

The last two of those functions are not well-designed. The function that actually decides if we generate a CGU-internal copy is `instantiation_mode`, _not_ `generates_cgu_internal_copy`. The function `requires_inline` documents that it is about the LLVM `inline` attribute and that it is a hint. The LLVM attribute is called `inlinehint`, this function is also used by other codegen backends, and since it is part of instantiation mode selection it is *not* a hint.

The goal of this PR is to start cleaning up the logic into a sequence of checks that have a more logical flow and are easier to customize in the future (to do things like improve incrementality or improve optimizations without causing obscure linker errors because you forgot to update another part of the compiler).
2025-03-25 06:36:41 +00:00
..
apple Move versioned LLVM target creation to rustc_codegen_ssa 2024-11-01 17:07:18 +01:00
link Support raw-dylib link kind on ELF 2025-02-26 19:09:51 +01:00
linker Rustfmt 2025-02-08 22:12:13 +00:00
rpath Support rpath with -Clinker-flavor=ld 2024-11-24 01:20:29 +01:00
apple.rs Make #[used] work when linking with ld64 2025-02-24 04:04:59 +01:00
archive.rs Flatten ifs in rustc_codegen_ssa 2025-03-17 18:56:52 +00:00
command.rs feat(linker): check ARG_MAX on Unix platforms 2025-03-14 09:45:49 -04:00
link.rs Auto merge of #138630 - matthiaskrgr:rollup-kk1gogr, r=matthiaskrgr 2025-03-18 05:58:46 +00:00
linker.rs Also check for compiler-builtins in linked_symbols 2025-03-21 14:06:34 +00:00
lto.rs Make CodegenCx and Builder generic 2025-01-24 16:05:26 -05:00
metadata.rs Auto merge of #135695 - Noratrieb:elf-raw-dylib, r=bjorn3 2025-03-04 15:39:44 +00:00
mod.rs Move versioned LLVM target creation to rustc_codegen_ssa 2024-11-01 17:07:18 +01:00
rpath.rs Support rpath with -Clinker-flavor=ld 2024-11-24 01:20:29 +01:00
symbol_export.rs Auto merge of #136410 - saethlin:clean-up-cgu-internal-copy, r=compiler-errors 2025-03-25 06:36:41 +00:00
write.rs Auto merge of #128320 - saethlin:link-me-maybe, r=compiler-errors 2025-03-21 21:03:49 +00:00