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 @@ -623,11 +623,12 @@ impl Options {
623623 }
624624
625625 let target = parse_target_triple ( early_dcx, matches) ;
626+ let maybe_sysroot = matches. opt_str ( "sysroot" ) . map ( PathBuf :: from) ;
626627
627628 let libs = matches
628629 . opt_strs ( "L" )
629630 . iter ( )
630- . map ( |s| SearchPath :: from_cli_opt ( None , & target, early_dcx, s) )
631+ . map ( |s| SearchPath :: from_cli_opt ( maybe_sysroot . as_deref ( ) , & target, early_dcx, s) )
631632 . collect ( ) ;
632633
633634 let show_coverage = matches. opt_present ( "show-coverage" ) ;
@@ -657,7 +658,6 @@ impl Options {
657658 let bin_crate = crate_types. contains ( & CrateType :: Executable ) ;
658659 let proc_macro_crate = crate_types. contains ( & CrateType :: ProcMacro ) ;
659660 let playground_url = matches. opt_str ( "playground-url" ) ;
660- let maybe_sysroot = matches. opt_str ( "sysroot" ) . map ( PathBuf :: from) ;
661661 let module_sorting = if matches. opt_present ( "sort-modules-by-appearance" ) {
662662 ModuleSorting :: DeclarationOrder
663663 } else {
You can’t perform that action at this time.
0 commit comments