File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -617,11 +617,12 @@ impl Options {
617617 }
618618
619619 let target = parse_target_triple ( early_dcx, matches) ;
620+ let maybe_sysroot = matches. opt_str ( "sysroot" ) . map ( PathBuf :: from) ;
620621
621622 let libs = matches
622623 . opt_strs ( "L" )
623624 . iter ( )
624- . map ( |s| SearchPath :: from_cli_opt ( None , & target, early_dcx, s) )
625+ . map ( |s| SearchPath :: from_cli_opt ( maybe_sysroot . as_deref ( ) , & target, early_dcx, s) )
625626 . collect ( ) ;
626627
627628 let show_coverage = matches. opt_present ( "show-coverage" ) ;
@@ -651,7 +652,6 @@ impl Options {
651652 let bin_crate = crate_types. contains ( & CrateType :: Executable ) ;
652653 let proc_macro_crate = crate_types. contains ( & CrateType :: ProcMacro ) ;
653654 let playground_url = matches. opt_str ( "playground-url" ) ;
654- let maybe_sysroot = matches. opt_str ( "sysroot" ) . map ( PathBuf :: from) ;
655655 let module_sorting = if matches. opt_present ( "sort-modules-by-appearance" ) {
656656 ModuleSorting :: DeclarationOrder
657657 } else {
You can’t perform that action at this time.
0 commit comments