rust/compiler
bors 31ffe48723 Auto merge of #116035 - lqd:mcp-510-target-specs, r=petrochenkov
Allow target specs to use an LLD flavor, and self-contained linking components

This PR allows:
- target specs to use an LLD linker-flavor: this is needed to switch `x86_64-unknown-linux-gnu` to using LLD, and is currently not possible because the current flavor json serialization fails to roundtrip on the modern linker-flavors. This can e.g. be seen in https://github.com/rust-lang/rust/pull/115622#discussion_r1321312880 which explains where an `Lld::Yes` is ultimately deserialized into an `Lld::No`.
- target specs to declare self-contained linking components: this is needed to switch `x86_64-unknown-linux-gnu` to using `rust-lld`
- adds an end-to-end test of a custom target json simulating `x86_64-unknown-linux-gnu` being switched to using `rust-lld`
- disables codegen backends from participating because they don't support `-Zgcc-ld=lld` which is the basis of mcp510.

r? `@petrochenkov:` if the approach discussed https://github.com/rust-lang/rust/pull/115622#discussion_r1329403467 and on zulip would work for you: basically, see if we can emit only modern linker flavors in the json specs, but accept both old and new flavors while reading them, to fix the roundtrip issue.

The backwards compatible `LinkSelfContainedDefault` variants are still serialized and deserialized in `crt-objects-fallback`, while the spec equivalent of e.g. `-Clink-self-contained=+linker` is serialized into a different json object (with future-proofing to incorporate `crt-objects-fallback`  in the future).

---

I've been test-driving this in https://github.com/rust-lang/rust/pull/113382 to test actually switching `x86_64-unknown-linux-gnu`  to `rust-lld` (and fix what needs to be fixed in CI, bootstrap, etc), and it seems to work fine.
2023-10-27 02:11:36 +00:00
..
rustc
rustc_abi s/generator/coroutine/ 2023-10-20 21:14:01 +00:00
rustc_arena rustdoc: remove rust logo from non-Rust crates 2023-10-08 20:17:53 -07:00
rustc_ast Rollup merge of #117114 - nnethercote:improve-stringify-test, r=petrochenkov 2023-10-26 22:26:11 +02:00
rustc_ast_lowering Auto merge of #117171 - fee1-dead-contrib:deny-explicit-effect-params, r=oli-obk 2023-10-26 14:50:23 +00:00
rustc_ast_passes s/generator/coroutine/ 2023-10-20 21:14:01 +00:00
rustc_ast_pretty Auto merge of #116822 - notriddle:notriddle/rust-logo, r=fmease 2023-10-17 04:41:20 +00:00
rustc_attr Pre-intern a symbol for env!("CFG_RELEASE") 2023-10-26 02:02:22 -07:00
rustc_baked_icu_data docs: add Rust logo to more compiler crates 2023-10-16 15:38:08 -07:00
rustc_borrowck Quietly fail if an error has already occurred 2023-10-26 11:14:53 +00:00
rustc_builtin_macros Auto merge of #116236 - dtolnay:builtinmacrocomment, r=cjgillot 2023-10-25 06:57:37 +00:00
rustc_codegen_cranelift Merge commit '93a5433f17ab5ed48cc88f1e69b0713b16183373' into sync_cg_clif-2023-10-24 2023-10-24 12:22:23 +00:00
rustc_codegen_gcc s/generator/coroutine/ 2023-10-20 21:14:01 +00:00
rustc_codegen_llvm Auto merge of #116033 - bvanjoi:fix-116032, r=petrochenkov 2023-10-23 20:24:09 +00:00
rustc_codegen_ssa Auto merge of #116035 - lqd:mcp-510-target-specs, r=petrochenkov 2023-10-27 02:11:36 +00:00
rustc_const_eval Refactor away the need for some descr methods. 2023-10-25 16:40:32 +00:00
rustc_data_structures Auto merge of #116849 - oli-obk:error_shenanigans, r=cjgillot 2023-10-23 09:59:40 +00:00
rustc_driver docs: add Rust logo to more compiler crates 2023-10-16 15:38:08 -07:00
rustc_driver_impl Auto merge of #116818 - Nilstrieb:stop-submitting-bug-reports, r=wesleywiser 2023-10-26 02:08:07 +00:00
rustc_error_codes Replace all uses of generator in markdown documentation with coroutine 2023-10-20 21:14:02 +00:00
rustc_error_messages docs: add Rust logo to more compiler crates 2023-10-16 15:38:08 -07:00
rustc_errors Auto merge of #116962 - estebank:issue-63835, r=oli-obk 2023-10-20 10:52:24 +00:00
rustc_expand Auto merge of #116818 - Nilstrieb:stop-submitting-bug-reports, r=wesleywiser 2023-10-26 02:08:07 +00:00
rustc_feature Rollup merge of #116943 - heiher:target-features, r=wesleywiser 2023-10-24 19:29:55 +02:00
rustc_fluent_macro Use v0.0.0 in compiler crates 2023-10-18 21:55:15 +00:00
rustc_fs_util
rustc_graphviz rustdoc: remove rust logo from non-Rust crates 2023-10-08 20:17:53 -07:00
rustc_hir Auto merge of #117171 - fee1-dead-contrib:deny-explicit-effect-params, r=oli-obk 2023-10-26 14:50:23 +00:00
rustc_hir_analysis Auto merge of #117171 - fee1-dead-contrib:deny-explicit-effect-params, r=oli-obk 2023-10-26 14:50:23 +00:00
rustc_hir_pretty Fiddle with State functions. 2023-10-11 10:46:55 +11:00
rustc_hir_typeck Rollup merge of #116968 - eopb:116967, r=petrochenkov 2023-10-26 22:26:10 +02:00
rustc_incremental Reduce some function exposure. 2023-10-26 09:04:26 +11:00
rustc_index Preserve DebugInfo in DeadStoreElimination. 2023-10-06 15:46:11 +00:00
rustc_infer Refactor away the need for some descr methods. 2023-10-25 16:40:32 +00:00
rustc_interface Rollup merge of #117207 - Zalathar:no-option, r=compiler-errors 2023-10-26 17:45:45 +02:00
rustc_lexer Use v0.0.0 in compiler crates 2023-10-18 21:55:15 +00:00
rustc_lint Make ty::print::Printer take &mut self instead of self 2023-10-21 11:33:05 +02:00
rustc_lint_defs Auto merge of #116734 - Nadrieril:lint-per-column, r=cjgillot 2023-10-21 11:04:19 +00:00
rustc_llvm rustdoc: remove rust logo from non-Rust crates 2023-10-08 20:17:53 -07:00
rustc_log use env variable to control thread ids in rustc_log 2023-10-10 09:39:47 +08:00
rustc_macros Fix symbols::tests::test_symbols 2023-10-26 02:02:22 -07:00
rustc_metadata s/generator/coroutine/ 2023-10-20 21:14:01 +00:00
rustc_middle Replace type flag HAS_TY_GENERATOR with HAS_TY_COROUTINE 2023-10-26 15:18:50 +02:00
rustc_mir_build Auto merge of #113262 - Nilstrieb:rawr-casting, r=lcnr 2023-10-26 12:54:19 +00:00
rustc_mir_dataflow Auto merge of #116300 - cjgillot:split-move, r=petrochenkov 2023-10-24 00:25:32 +00:00
rustc_mir_transform Rollup merge of #117141 - tmiasko:inline-target-features, r=oli-obk 2023-10-25 19:51:14 +02:00
rustc_monomorphize coverage: Change query codegened_and_inlined_items to a plain function 2023-10-21 12:20:05 +11:00
rustc_parse Avoid unbounded O(n^2) when parsing nested type args 2023-10-25 19:07:34 +00:00
rustc_parse_format rustdoc: remove rust logo from non-Rust crates 2023-10-08 20:17:53 -07:00
rustc_passes Pre-intern a symbol for env!("CFG_RELEASE") 2023-10-26 02:02:22 -07:00
rustc_plugin_impl rustdoc: remove rust logo from non-Rust crates 2023-10-08 20:17:53 -07:00
rustc_privacy Merge associated types with the other alias types 2023-10-23 10:10:22 +00:00
rustc_query_impl rustdoc: remove rust logo from non-Rust crates 2023-10-08 20:17:53 -07:00
rustc_query_system fix broken link: update incremental compilation url 2023-10-22 07:20:36 -07:00
rustc_resolve Rollup merge of #116905 - Fenex:refactor/compiler/resolve, r=petrochenkov 2023-10-26 17:45:43 +02:00
rustc_serialize rustdoc: remove rust logo from non-Rust crates 2023-10-08 20:17:53 -07:00
rustc_session Rollup merge of #117207 - Zalathar:no-option, r=compiler-errors 2023-10-26 17:45:45 +02:00
rustc_smir Rollup merge of #117095 - klinvill:smir-fn-arg-count, r=oli-obk 2023-10-26 17:45:43 +02:00
rustc_span Pre-intern a symbol for env!("CFG_RELEASE") 2023-10-26 02:02:22 -07:00
rustc_symbol_mangling Make ty::print::Printer take &mut self instead of self 2023-10-21 11:33:05 +02:00
rustc_target Auto merge of #116035 - lqd:mcp-510-target-specs, r=petrochenkov 2023-10-27 02:11:36 +00:00
rustc_trait_selection Auto merge of #113183 - estebank:redundant-sized-errors, r=davidtwco 2023-10-27 00:06:12 +00:00
rustc_traits
rustc_transmute Use v0.0.0 in compiler crates 2023-10-18 21:55:15 +00:00
rustc_ty_utils Rollup merge of #117136 - compiler-errors:defid-list, r=oli-obk 2023-10-25 17:40:29 +02:00
rustc_type_ir Replace type flag HAS_TY_GENERATOR with HAS_TY_COROUTINE 2023-10-26 15:18:50 +02:00
stable_mir Rollup merge of #117095 - klinvill:smir-fn-arg-count, r=oli-obk 2023-10-26 17:45:43 +02:00