File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
compiler/rustc_session/src Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -2442,6 +2442,18 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options {
2442
2442
) ;
2443
2443
}
2444
2444
2445
+ // Until the unstable flag is removed, ensure `-Zgcc-ld=lld` and `-Clinker-flavor=gcc:lld` have
2446
+ // a matching linker choice.
2447
+ if let Some ( LinkerFlavorCli :: Gcc { use_ld } ) = & cg. linker_flavor {
2448
+ if use_ld != "lld" && unstable_opts. gcc_ld == Some ( LdImpl :: Lld ) {
2449
+ early_error (
2450
+ error_format,
2451
+ "`-Zgcc-ld=lld` and `-Clinker-flavor` differ in their \
2452
+ linker choice. The latter should be `-Clinker-flavor=gcc:lld`",
2453
+ ) ;
2454
+ }
2455
+ }
2456
+
2445
2457
let prints = collect_print_requests ( & mut cg, & mut unstable_opts, matches, error_format) ;
2446
2458
2447
2459
let cg = cg;
You can’t perform that action at this time.
0 commit comments