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 @@ -2580,6 +2580,18 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options {
25802580 ) ;
25812581 }
25822582
2583+ // Until the unstable flag is removed, ensure `-Zgcc-ld=lld` and `-Clinker-flavor=gcc:lld` have
2584+ // a matching linker choice.
2585+ if let Some ( LinkerFlavorCli :: Gcc { use_ld } ) = & cg. linker_flavor {
2586+ if use_ld != "lld" && debugging_opts. gcc_ld == Some ( LdImpl :: Lld ) {
2587+ early_error (
2588+ error_format,
2589+ "`-Zgcc-ld=lld` and `-Clinker-flavor` differ in their \
2590+ linker choice. The latter should be `-Clinker-flavor=gcc:lld`",
2591+ ) ;
2592+ }
2593+ }
2594+
25832595 let prints = collect_print_requests ( & mut cg, & mut debugging_opts, matches, error_format) ;
25842596
25852597 let cg = cg;
You can’t perform that action at this time.
0 commit comments