Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
b6f12d7
Rename extended rustc tool macros
Kobzol Jun 18, 2025
65c3597
Add metadata to `Cargo` and `RustAnalyzer` tools
Kobzol Jul 22, 2025
57a6c93
Cleanup `ensure_if_default` to not require `Option` output
Kobzol Jul 22, 2025
8fed3fb
Add step metadata to `RustAnalyzerProcMacroSrv`
Kobzol Jul 22, 2025
2f3bfff
Rename `Builder::rustdoc` to `Builder::rustdoc_for_compiler`
Kobzol Jul 22, 2025
6d562b2
Implement `RustcPrivateCompilers` to unify building of `rustc_private…
Kobzol Jul 22, 2025
b944144
Add step metadata and a few tests for `Doc` steps
Kobzol Jul 22, 2025
2c7581f
Refactor `Rustdoc`
Kobzol Jul 22, 2025
91d40d2
Fix `ToolRustc` build with `download-rustc`
Kobzol Jul 22, 2025
7a2c4d3
Add step metadata and a simple test for codegen backends
Kobzol Jul 22, 2025
06855be
Port codegen backends to `RustcPrivateCompilers`
Kobzol Jul 22, 2025
c3da07b
Rename `link_compiler` to `target_compiler`
Kobzol Jul 22, 2025
0ff8ff3
Appease Clippy
Kobzol Jul 22, 2025
316b5d3
Add basic Cargo snapshot test
Kobzol Jul 21, 2025
21d7a54
Make `Cargo` a `ToolTarget` tool
Kobzol Jul 21, 2025
021f2ff
Update `CargoTest`
Kobzol Jul 21, 2025
3e6aa81
Add snapshot tests for `test cargo` and update Cargo snapshot tests
Kobzol Jul 21, 2025
528e7dc
Make build compiler explicit in `dist::Cargo`
Kobzol Jul 28, 2025
1d1efed
Fix `x test cargo`
Kobzol Jul 29, 2025
47da014
Make `x test cargo` stage N test rustc stage N
Kobzol Jul 31, 2025
c46f42d
Clarify comments on Cargo (self-)test steps
Kobzol Aug 1, 2025
ac28b5b
Fix splitting dylib paths
Kobzol Aug 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix splitting dylib paths
  • Loading branch information
Kobzol committed Aug 4, 2025
commit ac28b5b93a834662f6a51139c262b71c04e16bf9
18 changes: 8 additions & 10 deletions src/bootstrap/src/core/build_steps/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//! However, this contains ~all test parts we expect people to be able to build and run locally.

use std::collections::HashSet;
use std::env::join_paths;
use std::env::split_paths;
use std::ffi::{OsStr, OsString};
use std::path::{Path, PathBuf};
use std::{env, fs, iter};
Expand Down Expand Up @@ -34,8 +34,8 @@ use crate::core::config::flags::{Subcommand, get_completion};
use crate::utils::build_stamp::{self, BuildStamp};
use crate::utils::exec::{BootstrapCommand, command};
use crate::utils::helpers::{
self, LldThreads, add_rustdoc_cargo_linker_args, dylib_path, dylib_path_var, linker_args,
linker_flags, t, target_supports_cranelift_backend, up_to_date,
self, LldThreads, add_dylib_path, add_rustdoc_cargo_linker_args, dylib_path, dylib_path_var,
linker_args, linker_flags, t, target_supports_cranelift_backend, up_to_date,
};
use crate::utils::render_tests::{add_flags_and_try_run_tests, try_run_tests};
use crate::{CLang, CodegenBackendKind, DocTests, GitRepo, Mode, PathSet, debug, envify};
Expand Down Expand Up @@ -380,16 +380,14 @@ impl Step for Cargo {
// libdir. That causes issues in cargo test, because the programs that cargo compiles are
// incorrectly picking that libdir, even though they should be picking the
// `tested_compiler`'s libdir. We thus have to override the precedence here.
let existing_dylib_path = cargo
let mut existing_dylib_paths = cargo
.get_envs()
.find(|(k, _)| *k == OsStr::new(dylib_path_var()))
.and_then(|(_, v)| v)
.unwrap_or(OsStr::new(""));
cargo.env(
dylib_path_var(),
join_paths([builder.rustc_libdir(tested_compiler).as_ref(), existing_dylib_path])
.unwrap_or_default(),
);
.map(|value| split_paths(value).collect::<Vec<PathBuf>>())
.unwrap_or_default();
existing_dylib_paths.insert(0, builder.rustc_libdir(tested_compiler));
add_dylib_path(existing_dylib_paths, &mut cargo);

// Cargo's test suite uses `CARGO_RUSTC_CURRENT_DIR` to determine the path that `file!` is
// relative to. Cargo no longer sets this env var, so we have to do that. This has to be the
Expand Down
Loading