rust/compiler
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
..
rustc Don't rerun the build script for the compiler each time on linux 2022-07-10 23:57:25 -05:00
rustc_apfloat
rustc_arena Rollup merge of #97711 - Nilstrieb:rustc-arena-ub, r=wesleywiser 2022-07-07 18:06:49 +05:30
rustc_ast Stabilize let_chains 2022-07-16 20:17:58 -03:00
rustc_ast_lowering Remove unused StableMap and StableSet types from rustc_data_structures 2022-07-20 13:11:39 +02:00
rustc_ast_passes Auto merge of #98180 - notriddle:notriddle/rustdoc-fn, r=petrochenkov,GuillaumeGomez 2022-07-19 19:36:57 +00:00
rustc_ast_pretty Parse closure binders 2022-07-12 16:25:16 +04:00
rustc_attr middle: add implies_by to #[unstable] 2022-07-20 14:53:01 +01:00
rustc_borrowck Auto merge of #99058 - michaelwoerister:remove-stable-set-and-map, r=nagisa 2022-07-20 22:19:30 +00:00
rustc_builtin_macros Rollup merge of #99508 - TaKO8Ki:avoid-symbol-to-string-conversion-in-BuiltinLintDiagnostics, r=compiler-errors 2022-07-20 18:58:20 +02:00
rustc_codegen_cranelift Revert "Rollup merge of #98582 - oli-obk:unconstrained_opaque_type, r=estebank" 2022-07-20 07:55:58 +00:00
rustc_codegen_gcc Remove unused StableMap and StableSet types from rustc_data_structures 2022-07-20 13:11:39 +02:00
rustc_codegen_llvm Auto merge of #98162 - nextsilicon:support_lto_embed_bitcode, r=davidtwco 2022-07-21 10:13:59 +00:00
rustc_codegen_ssa Auto merge of #98162 - nextsilicon:support_lto_embed_bitcode, r=davidtwco 2022-07-21 10:13:59 +00:00
rustc_const_eval Auto merge of #99472 - RalfJung:provenance, r=oli-obk 2022-07-20 16:56:31 +00:00
rustc_data_structures Remove unused StableMap and StableSet types from rustc_data_structures 2022-07-20 13:11:39 +02:00
rustc_driver Rename debugging_opts to unstable_opts 2022-07-13 17:47:06 -05:00
rustc_error_codes Auto merge of #98180 - notriddle:notriddle/rustdoc-fn, r=petrochenkov,GuillaumeGomez 2022-07-19 19:36:57 +00:00
rustc_error_messages Auto merge of #98180 - notriddle:notriddle/rustdoc-fn, r=petrochenkov,GuillaumeGomez 2022-07-19 19:36:57 +00:00
rustc_errors Auto merge of #99058 - michaelwoerister:remove-stable-set-and-map, r=nagisa 2022-07-20 22:19:30 +00:00
rustc_expand better error for bad depth on macro metavar expr 2022-07-19 16:41:32 +00:00
rustc_feature Stabilize let_chains 2022-07-16 20:17:58 -03:00
rustc_fs_util
rustc_graphviz
rustc_hir Remove unused StableMap and StableSet types from rustc_data_structures 2022-07-20 13:11:39 +02:00
rustc_hir_pretty use rustc_hir_pretty::qpath_to_string to avoid span_to_snippet when rendering path 2022-07-17 04:58:38 +00:00
rustc_incremental Remove unused StableMap and StableSet types from rustc_data_structures 2022-07-20 13:11:39 +02:00
rustc_index
rustc_infer Auto merge of #99058 - michaelwoerister:remove-stable-set-and-map, r=nagisa 2022-07-20 22:19:30 +00:00
rustc_interface Auto merge of #98162 - nextsilicon:support_lto_embed_bitcode, r=davidtwco 2022-07-21 10:13:59 +00:00
rustc_lexer
rustc_lint Rollup merge of #99433 - cjgillot:erase-foreign-sig, r=compiler-errors 2022-07-20 11:29:39 +05:30
rustc_lint_defs avoid a Symbol to String conversion 2022-07-20 18:19:25 +09:00
rustc_llvm Auto merge of #98162 - nextsilicon:support_lto_embed_bitcode, r=davidtwco 2022-07-21 10:13:59 +00:00
rustc_log
rustc_macros macros: support adding warnings to diags 2022-07-15 16:13:49 +01:00
rustc_metadata passes: improved partial stabilization diagnostic 2022-07-20 14:53:01 +01:00
rustc_middle Auto merge of #99058 - michaelwoerister:remove-stable-set-and-map, r=nagisa 2022-07-20 22:19:30 +00:00
rustc_mir_build Revert "Rollup merge of #98582 - oli-obk:unconstrained_opaque_type, r=estebank" 2022-07-20 07:55:58 +00:00
rustc_mir_dataflow Auto merge of #99058 - michaelwoerister:remove-stable-set-and-map, r=nagisa 2022-07-20 22:19:30 +00:00
rustc_mir_transform Auto merge of #99058 - michaelwoerister:remove-stable-set-and-map, r=nagisa 2022-07-20 22:19:30 +00:00
rustc_monomorphize use par_for_each_in in par_body_owners and collect_crate_mono_items 2022-07-19 17:00:51 +08:00
rustc_parse Stabilize let_chains 2022-07-16 20:17:58 -03:00
rustc_parse_format Add diagnostic width span when '0$' is used as width. 2022-07-20 13:39:56 +01:00
rustc_passes Auto merge of #99058 - michaelwoerister:remove-stable-set-and-map, r=nagisa 2022-07-20 22:19:30 +00:00
rustc_plugin_impl
rustc_privacy errors: lint on LintDiagnosticBuilder::build 2022-07-15 16:13:47 +01:00
rustc_query_impl Use constant eval to do strict validity checks 2022-07-14 22:55:17 +01:00
rustc_query_system Rename debugging_opts to unstable_opts 2022-07-13 17:47:06 -05:00
rustc_resolve Rollup merge of #99508 - TaKO8Ki:avoid-symbol-to-string-conversion-in-BuiltinLintDiagnostics, r=compiler-errors 2022-07-20 18:58:20 +02:00
rustc_save_analysis Rollup merge of #98705 - WaffleLapkin:closure_binder, r=cjgillot 2022-07-14 14:14:21 +05:30
rustc_serialize
rustc_session Auto merge of #98162 - nextsilicon:support_lto_embed_bitcode, r=davidtwco 2022-07-21 10:13:59 +00:00
rustc_smir
rustc_span span: add span_extend_to_line helper 2022-07-20 14:53:01 +01:00
rustc_symbol_mangling Allow to create definitions inside the query system. 2022-07-06 22:50:55 +02:00
rustc_target Remove unused StableMap and StableSet types from rustc_data_structures 2022-07-20 13:11:39 +02:00
rustc_trait_selection take opaq types 2022-07-20 12:43:10 +03:00
rustc_traits Remove unused StableMap and StableSet types from rustc_data_structures 2022-07-20 13:11:39 +02:00
rustc_ty_utils Remove unused StableMap and StableSet types from rustc_data_structures 2022-07-20 13:11:39 +02:00
rustc_type_ir Remove unused StableMap and StableSet types from rustc_data_structures 2022-07-20 13:11:39 +02:00
rustc_typeck Auto merge of #93718 - thomcc:used-macho, r=pnkfelix 2022-07-21 06:59:32 +00:00