rust/compiler/rustc_codegen_gcc/src
Guillaume Gomez 4ee97fc3db
Rollup merge of #125345 - durin42:thin-link-bitcode, r=bjorn3
rustc_codegen_llvm: add support for writing summary bitcode

Typical uses of ThinLTO don't have any use for this as a standalone file, but distributed ThinLTO uses this to make the linker phase more efficient. With clang you'd do something like `clang -flto=thin -fthin-link-bitcode=foo.indexing.o -c foo.c` and then get both foo.o (full of bitcode) and foo.indexing.o (just the summary or index part of the bitcode). That's then usable by a two-stage linking process that's more friendly to distributed build systems like bazel, which is why I'm working on this area.

I talked some to `@teresajohnson` about naming in this area, as things seem to be a little confused between various blog posts and build systems. "bitcode index" and "bitcode summary" tend to be a little too ambiguous, and she tends to use "thin link bitcode" and "minimized bitcode" (which matches the descriptions in LLVM). Since the clang option is thin-link-bitcode, I went with that to try and not add a new spelling in the world.

Per `@dtolnay,` you can work around the lack of this by using `lld --thinlto-index-only` to do the indexing on regular .o files of bitcode, but that is a bit wasteful on actions when we already have all the information in rustc and could just write out the matching minimized bitcode. I didn't test that at all in our infrastructure, because by the time I learned that I already had this patch largely written.
2024-05-23 23:39:26 +02:00
..
back Save/restore more items in cache with incremental compilation 2024-04-06 10:59:24 -04:00
intrinsic Stop using to_hir_binop in codegen 2024-05-22 01:34:26 -07:00
abi.rs Merge commit 'b385428e3d' into subtree-update_cg_gcc_2024-03-05 2024-03-05 19:58:36 +01:00
allocator.rs Merge commit 'b385428e3d' into subtree-update_cg_gcc_2024-03-05 2024-03-05 19:58:36 +01:00
archive.rs remove useless lifetime of ArchiveBuilder 2024-02-26 22:37:04 +08:00
asm.rs CFI: Use Instance at callsites 2024-03-23 18:30:39 +00:00
attributes.rs Merge commit 'b385428e3d' into subtree-update_cg_gcc_2024-03-05 2024-03-05 19:58:36 +01:00
base.rs Merge commit 'b385428e3d' into subtree-update_cg_gcc_2024-03-05 2024-03-05 19:58:36 +01:00
builder.rs codegen: memmove/memset cannot be non-temporal 2024-05-09 18:59:00 +02:00
callee.rs Merge commit 'b385428e3d' into subtree-update_cg_gcc_2024-03-05 2024-03-05 19:58:36 +01:00
common.rs Add+Use mir::BinOp::Cmp 2024-03-23 23:23:41 -07:00
consts.rs Make some functions private that are only ever used in the same module 2024-03-12 05:53:46 +00:00
context.rs Stabilize the size of incr comp object file names 2024-04-22 10:50:07 -04:00
coverageinfo.rs Unbox and unwrap the contents of StatementKind::Coverage 2024-03-23 22:05:11 +11:00
debuginfo.rs Simplify use crate::rustc_foo::bar occurrences. 2024-05-08 16:57:31 +10:00
declare.rs Merge commit 'b385428e3d' into subtree-update_cg_gcc_2024-03-05 2024-03-05 19:58:36 +01:00
errors.rs Rename IntoDiagnostic as Diagnostic. 2024-03-11 09:15:09 +11:00
gcc_util.rs Merge commit 'b385428e3d' into subtree-update_cg_gcc_2024-03-05 2024-03-05 19:58:36 +01:00
int.rs Merge commit 'b385428e3d' into subtree-update_cg_gcc_2024-03-05 2024-03-05 19:58:36 +01:00
lib.rs rustc_codegen_gcc: fix changed method signature 2024-05-23 15:23:21 -04:00
mono_item.rs Some comment nits 2024-03-12 08:51:20 +00:00
type_.rs Fix cg_gcc build 2024-03-05 20:17:29 +01:00
type_of.rs Rollup merge of #124797 - beetrees:primitive-float, r=davidtwco 2024-05-10 16:10:46 +02:00