rust/compiler/rustc_codegen_llvm/src
bors 74f600b990 Auto merge of #98162 - nextsilicon:support_lto_embed_bitcode, r=davidtwco
Allow to disable thinLTO buffer to support lto-embed-bitcode lld feature

Hello
This change is to fix issue (https://github.com/rust-lang/rust/issues/84395) in which passing "-lto-embed-bitcode=optimized" to lld when linking rust code via linker-plugin-lto doesn't produce the expected result.

Instead of emitting a single unified module into a llvmbc section of the linked elf, it emits multiple submodules.
This is caused because rustc emits the BC modules after running llvm `createWriteThinLTOBitcodePass` pass.
Which in turn triggers a thinLTO linkage and causes the said issue.

This patch allows via compiler flag (-Cemit-thin-lto=<bool>) to select between running `createWriteThinLTOBitcodePass` and `createBitcodeWriterPass`.
Note this pattern of selecting between those 2 passes is common inside of LLVM code.
The default is to match the old behavior.
2022-07-21 10:13:59 +00:00
..
back Auto merge of #98162 - nextsilicon:support_lto_embed_bitcode, r=davidtwco 2022-07-21 10:13:59 +00:00
coverageinfo add #[rustc_pass_by_value] to more types 2022-03-08 15:39:52 +01:00
debuginfo Rollup merge of #99401 - TaKO8Ki:avoid-symbol-to-&str-conversions, r=nnethercote 2022-07-19 13:30:46 +02:00
llvm Auto merge of #98162 - nextsilicon:support_lto_embed_bitcode, r=davidtwco 2022-07-21 10:13:59 +00:00
abi.rs Rename debugging_opts to unstable_opts 2022-07-13 17:47:06 -05:00
allocator.rs Rename debugging_opts to unstable_opts 2022-07-13 17:47:06 -05:00
asm.rs Add tmm_reg clobbers 2022-05-16 20:15:06 -04:00
attributes.rs Rollup merge of #98998 - workingjubilee:naked-means-no-clothes-enforcement-technology, r=Amanieu 2022-07-18 21:14:43 +05:30
base.rs Auto merge of #95689 - lqd:self-profiler, r=wesleywiser 2022-04-16 11:43:28 +00:00
builder.rs Prefer trace level instrumentation for the new noisy instrument attributes 2022-07-05 09:27:06 +00:00
callee.rs Update TypeVisitor paths 2022-07-06 06:41:53 +01:00
common.rs don't allow ZST in ScalarInt 2022-07-09 07:27:29 -04:00
consts.rs Auto merge of #93718 - thomcc:used-macho, r=pnkfelix 2022-07-21 06:59:32 +00:00
context.rs Rename debugging_opts to unstable_opts 2022-07-13 17:47:06 -05:00
declare.rs Remove LLVM attribute removal 2022-02-28 00:02:11 -05:00
intrinsic.rs rustc_target: Remove some redundant target properties 2022-06-18 01:09:20 +03:00
lib.rs Stabilize let_chains 2022-07-16 20:17:58 -03:00
llvm_util.rs Rename debugging_opts to unstable_opts 2022-07-13 17:47:06 -05:00
mono_item.rs Update TypeVisitor paths 2022-07-06 06:41:53 +01:00
type_.rs Remove crate visibility usage in compiler 2022-05-20 20:04:54 -04:00
type_of.rs Update TypeVisitor paths 2022-07-06 06:41:53 +01:00
va_arg.rs Introduce Bx::switch_to_block 2022-02-24 12:18:21 +01:00
value.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00