Rollup merge of #135330 - bjorn3:respect_sysroot_in_version_printing, r=lqd
Respect --sysroot for rustc -vV and -Cpasses=list This is necessary when the specified codegen backend is in a custom sysroot. Fixes https://github.com/rust-lang/rust/issues/135165
This commit is contained in:
commit
c8c5fa4893
4 changed files with 31 additions and 19 deletions
|
@ -383,7 +383,7 @@ pub fn run_compiler<R: Send>(config: Config, f: impl FnOnce(&Compiler) -> R + Se
|
|||
crate::callbacks::setup_callbacks();
|
||||
|
||||
let sysroot = filesearch::materialize_sysroot(config.opts.maybe_sysroot.clone());
|
||||
let target = config::build_target_config(&early_dcx, &config.opts, &sysroot);
|
||||
let target = config::build_target_config(&early_dcx, &config.opts.target_triple, &sysroot);
|
||||
let file_loader = config.file_loader.unwrap_or_else(|| Box::new(RealFileLoader));
|
||||
let path_mapping = config.opts.file_path_mapping();
|
||||
let hash_kind = config.opts.unstable_opts.src_hash_algorithm(&target);
|
||||
|
|
|
@ -42,7 +42,8 @@ where
|
|||
let matches = optgroups().parse(args).unwrap();
|
||||
let sessopts = build_session_options(&mut early_dcx, &matches);
|
||||
let sysroot = filesearch::materialize_sysroot(sessopts.maybe_sysroot.clone());
|
||||
let target = rustc_session::config::build_target_config(&early_dcx, &sessopts, &sysroot);
|
||||
let target =
|
||||
rustc_session::config::build_target_config(&early_dcx, &sessopts.target_triple, &sysroot);
|
||||
let hash_kind = sessopts.unstable_opts.src_hash_algorithm(&target);
|
||||
let checksum_hash_kind = sessopts.unstable_opts.checksum_hash_algorithm();
|
||||
let sm_inputs = Some(SourceMapInputs {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue