compiletest: rename run_lib_path -> target_run_lib_path

This commit is contained in:
Jieyou Xu
2025-12-03 09:06:29 +08:00
parent ae93635f5d
commit 0654444d7f
6 changed files with 11 additions and 14 deletions
+1 -4
View File
@@ -260,13 +260,10 @@ pub struct Config {
/// For example:
/// - `/home/ferris/rust/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/i686-unknown-linux-gnu/lib`
///
/// FIXME: maybe rename this to reflect (1) which target platform (target, not host), and (2)
/// what "run libraries" are against.
///
/// FIXME: this is very under-documented in conjunction with the `remote-test-client` scheme and
/// `RUNNER` scheme to actually run the target executable under the target platform environment,
/// cf. [`Self::remote_test_client`] and [`Self::runner`].
pub run_lib_path: Utf8PathBuf,
pub target_run_lib_path: Utf8PathBuf,
/// Path to the *staged* `rustc`-under-test. Unless forced, this `rustc` is *staged*, and must
/// not be confused with [`Self::stage0_rustc_path`].
+2 -2
View File
@@ -376,7 +376,7 @@ fn opt_path(m: &getopts::Matches, nm: &str) -> Utf8PathBuf {
|| env::var_os("RUSTC_TEST_FAIL_FAST").is_some(),
host_compile_lib_path: make_absolute(opt_path(matches, "compile-lib-path")),
run_lib_path: make_absolute(opt_path(matches, "run-lib-path")),
target_run_lib_path: make_absolute(opt_path(matches, "run-lib-path")),
rustc_path: opt_path(matches, "rustc-path"),
cargo_path: matches.opt_str("cargo-path").map(Utf8PathBuf::from),
stage0_rustc_path: matches.opt_str("stage0-rustc-path").map(Utf8PathBuf::from),
@@ -688,7 +688,7 @@ fn common_inputs_stamp(config: &Config) -> Stamp {
stamp.add_dir(&src_root.join("src/etc/natvis"));
stamp.add_dir(&config.run_lib_path);
stamp.add_dir(&config.target_run_lib_path);
if let Some(ref rustdoc_path) = config.rustdoc_path {
stamp.add_path(&rustdoc_path);
+4 -4
View File
@@ -1060,7 +1060,7 @@ fn document_inner(
rustdoc.current_dir(current_dir);
rustdoc
.arg("-L")
.arg(self.config.run_lib_path.as_path())
.arg(self.config.target_run_lib_path.as_path())
.arg("-L")
.arg(aux_dir)
.arg("-o")
@@ -1151,7 +1151,7 @@ fn exec_compiled_test_general(
self.compose_and_run(
test_client,
self.config.run_lib_path.as_path(),
self.config.target_run_lib_path.as_path(),
Some(aux_dir.as_path()),
None,
)
@@ -1166,7 +1166,7 @@ fn exec_compiled_test_general(
self.compose_and_run(
wr_run,
self.config.run_lib_path.as_path(),
self.config.target_run_lib_path.as_path(),
Some(aux_dir.as_path()),
None,
)
@@ -1181,7 +1181,7 @@ fn exec_compiled_test_general(
self.compose_and_run(
program,
self.config.run_lib_path.as_path(),
self.config.target_run_lib_path.as_path(),
Some(aux_dir.as_path()),
None,
)
@@ -90,7 +90,7 @@ fn run_debuginfo_cdb_test(&self) {
let debugger_run_result = self.compose_and_run(
cdb,
self.config.run_lib_path.as_path(),
self.config.target_run_lib_path.as_path(),
None, // aux_path
None, // input
);
@@ -313,7 +313,7 @@ fn run_debuginfo_gdb_test(&self) {
gdb.args(debugger_opts).env("PYTHONPATH", pythonpath);
debugger_run_result =
self.compose_and_run(gdb, self.config.run_lib_path.as_path(), None, None);
self.compose_and_run(gdb, self.config.target_run_lib_path.as_path(), None, None);
}
if !debugger_run_result.status.success() {
@@ -175,7 +175,7 @@ pub(super) fn run_rmake_test(&self) {
.env("HOST_RUSTC_DYLIB_PATH", &self.config.host_compile_lib_path)
// Provide the directory to libraries that might be needed to run binaries created
// by a compiler invoked by the recipe.
.env("TARGET_EXE_DYLIB_PATH", &self.config.run_lib_path)
.env("TARGET_EXE_DYLIB_PATH", &self.config.target_run_lib_path)
// Provide the target.
.env("TARGET", &self.config.target)
// Some tests unfortunately still need Python, so provide path to a Python interpreter.
@@ -59,7 +59,7 @@ fn incomplete_config_for_rustdoc_gui_test() -> Config {
bless: Default::default(),
fail_fast: Default::default(),
host_compile_lib_path: Utf8PathBuf::default(),
run_lib_path: Utf8PathBuf::default(),
target_run_lib_path: Utf8PathBuf::default(),
rustc_path: Utf8PathBuf::default(),
cargo_path: Default::default(),
stage0_rustc_path: Default::default(),