Skip to content

Commit

Permalink
Make use of sysroot in librustdoc/config.rs for builtin:$path
Browse files Browse the repository at this point in the history
  • Loading branch information
Veykril committed Mar 4, 2024
1 parent 0402b46 commit c971d4a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/librustdoc/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -617,11 +617,12 @@ impl Options {
}

let target = parse_target_triple(early_dcx, matches);
let maybe_sysroot = matches.opt_str("sysroot").map(PathBuf::from);

let libs = matches
.opt_strs("L")
.iter()
.map(|s| SearchPath::from_cli_opt(None, &target, early_dcx, s))
.map(|s| SearchPath::from_cli_opt(Some(&maybe_sysroot), &target, early_dcx, s))
.collect();

let show_coverage = matches.opt_present("show-coverage");
Expand Down Expand Up @@ -651,7 +652,6 @@ impl Options {
let bin_crate = crate_types.contains(&CrateType::Executable);
let proc_macro_crate = crate_types.contains(&CrateType::ProcMacro);
let playground_url = matches.opt_str("playground-url");
let maybe_sysroot = matches.opt_str("sysroot").map(PathBuf::from);
let module_sorting = if matches.opt_present("sort-modules-by-appearance") {
ModuleSorting::DeclarationOrder
} else {
Expand Down

0 comments on commit c971d4a

Please sign in to comment.