From 130f033161cec4225d0c735c0ea13710c31f1347 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Rakic?= Date: Wed, 13 Apr 2022 22:30:05 +0200 Subject: [PATCH 1/2] enable `-Zgcc-ld=lld` by default for a crater run --- compiler/rustc_session/src/options.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_session/src/options.rs b/compiler/rustc_session/src/options.rs index 4994f8eaeb2dc..ed8dcf71e9221 100644 --- a/compiler/rustc_session/src/options.rs +++ b/compiler/rustc_session/src/options.rs @@ -1253,7 +1253,7 @@ options! { "whether each function should go in its own section"), future_incompat_test: bool = (false, parse_bool, [UNTRACKED], "forces all lints to be future incompatible, used for internal testing (default: no)"), - gcc_ld: Option = (None, parse_gcc_ld, [TRACKED], "implementation of ld used by cc"), + gcc_ld: Option = (Some(LdImpl::Lld), parse_gcc_ld, [TRACKED], "implementation of ld used by cc"), graphviz_dark_mode: bool = (false, parse_bool, [UNTRACKED], "use dark-themed colors in graphviz output (default: no)"), graphviz_font: String = ("Courier, monospace".to_string(), parse_string, [UNTRACKED], From 05a2b94c88c2c84676e59a6d0d85d9ae527f1528 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Rakic?= Date: Wed, 13 Apr 2022 22:36:12 +0200 Subject: [PATCH 2/2] do nothing when `-Zgcc-ld` is not applicable --- compiler/rustc_codegen_ssa/src/back/link.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs index cf32d558d4a51..bd757f05d2ff6 100644 --- a/compiler/rustc_codegen_ssa/src/back/link.rs +++ b/compiler/rustc_codegen_ssa/src/back/link.rs @@ -2607,8 +2607,6 @@ fn add_gcc_ld_path(cmd: &mut dyn Linker, sess: &Session, flavor: LinkerFlavor) { } } } - } else { - sess.fatal("option `-Z gcc-ld` is used even though linker flavor is not gcc"); } } }