diff options
| author | bors <bors@rust-lang.org> | 2025-06-24 21:58:31 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-06-24 21:58:31 +0000 |
| commit | 3de5b08ef6b260277dd4c77f7472fe6904bd6002 (patch) | |
| tree | f55214c62cfdd5e3f435b0e1e337fa2d0a0fd065 /compiler/rustc_interface/src/interface.rs | |
| parent | 28f1c807911c63f08d98e7b468cfcf15a441e34b (diff) | |
| parent | f299456597d36da11705f427102e782aafed38b1 (diff) | |
| download | rust-3de5b08ef6b260277dd4c77f7472fe6904bd6002.tar.gz rust-3de5b08ef6b260277dd4c77f7472fe6904bd6002.zip | |
Auto merge of #142979 - matthiaskrgr:rollup-szqah4e, r=matthiaskrgr
Rollup of 9 pull requests Successful merges: - rust-lang/rust#142645 (Also emit suggestions for usages in the `non_upper_case_globals` lint) - rust-lang/rust#142657 (mbe: Clean up code with non-optional `NonterminalKind`) - rust-lang/rust#142799 (rustc_session: Add a structure for keeping both explicit and default sysroots) - rust-lang/rust#142805 (Emit a single error when importing a path with `_`) - rust-lang/rust#142882 (Lazy init diagnostics-only local_names in borrowck) - rust-lang/rust#142883 (Add impl_trait_in_bindings tests from rust-lang/rust#61773) - rust-lang/rust#142943 (Don't include current rustc version string in feature removed help) - rust-lang/rust#142965 ([RTE-497] Ignore `c-link-to-rust-va-list-fn` test on SGX platform) - rust-lang/rust#142972 (Add a missing mailmap entry) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_interface/src/interface.rs')
| -rw-r--r-- | compiler/rustc_interface/src/interface.rs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/compiler/rustc_interface/src/interface.rs b/compiler/rustc_interface/src/interface.rs index d62bf7f85e0..c46e879b976 100644 --- a/compiler/rustc_interface/src/interface.rs +++ b/compiler/rustc_interface/src/interface.rs @@ -18,7 +18,6 @@ use rustc_parse::parser::attr::AllowLeadingUnsafe; use rustc_query_impl::QueryCtxt; use rustc_query_system::query::print_query_stack; use rustc_session::config::{self, Cfg, CheckCfg, ExpectedValues, Input, OutFileName}; -use rustc_session::filesearch::sysroot_with_fallback; use rustc_session::parse::ParseSess; use rustc_session::{CompilerIO, EarlyDiagCtxt, Session, lint}; use rustc_span::source_map::{FileLoader, RealFileLoader, SourceMapInputs}; @@ -405,8 +404,11 @@ pub fn run_compiler<R: Send>(config: Config, f: impl FnOnce(&Compiler) -> R + Se crate::callbacks::setup_callbacks(); - let sysroot = config.opts.sysroot.clone(); - let target = config::build_target_config(&early_dcx, &config.opts.target_triple, &sysroot); + let target = config::build_target_config( + &early_dcx, + &config.opts.target_triple, + config.opts.sysroot.path(), + ); 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); @@ -426,7 +428,7 @@ pub fn run_compiler<R: Send>(config: Config, f: impl FnOnce(&Compiler) -> R + Se let codegen_backend = match config.make_codegen_backend { None => util::get_codegen_backend( &early_dcx, - &sysroot, + &config.opts.sysroot, config.opts.unstable_opts.codegen_backend.as_deref(), &target, ), @@ -440,7 +442,7 @@ pub fn run_compiler<R: Send>(config: Config, f: impl FnOnce(&Compiler) -> R + Se let temps_dir = config.opts.unstable_opts.temps_dir.as_deref().map(PathBuf::from); let bundle = match rustc_errors::fluent_bundle( - sysroot_with_fallback(&config.opts.sysroot), + &config.opts.sysroot.all_paths().collect::<Vec<_>>(), config.opts.unstable_opts.translate_lang.clone(), config.opts.unstable_opts.translate_additional_ftl.as_deref(), config.opts.unstable_opts.translate_directionality_markers, @@ -469,7 +471,6 @@ pub fn run_compiler<R: Send>(config: Config, f: impl FnOnce(&Compiler) -> R + Se locale_resources, config.lint_caps, target, - sysroot, util::rustc_version_str().unwrap_or("unknown"), config.ice_file, config.using_internal_features, |
