Skip to content

Commit ae93635

Browse files
committed
compiletest: rename compile_lib_path -> host_compile_lib_path
1 parent 8202d11 commit ae93635

File tree

6 files changed

+11
-13
lines changed

6 files changed

+11
-13
lines changed

src/tools/compiletest/src/common.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -252,10 +252,7 @@ pub struct Config {
252252
///
253253
/// For example:
254254
/// - `/home/ferris/rust/build/x86_64-unknown-linux-gnu/stage1/bin/lib`
255-
///
256-
/// FIXME: maybe rename this to reflect (1) which target platform (host, not target), and (2)
257-
/// which `rustc` (the `rustc`-under-test, not the stage 0 `rustc` unless forced).
258-
pub compile_lib_path: Utf8PathBuf,
255+
pub host_compile_lib_path: Utf8PathBuf,
259256

260257
/// Path to libraries needed to run the compiled executable for the **target** platform. This
261258
/// corresponds to the **target** sysroot libraries, including the **target** standard library.
@@ -1093,7 +1090,7 @@ fn query_rustc_output(config: &Config, args: &[&str], envs: HashMap<String, Stri
10931090
let query_rustc_path = config.query_rustc_path.as_deref().unwrap_or(&config.rustc_path);
10941091

10951092
let mut command = Command::new(query_rustc_path);
1096-
add_dylib_path(&mut command, iter::once(&config.compile_lib_path));
1093+
add_dylib_path(&mut command, iter::once(&config.host_compile_lib_path));
10971094
command.args(&config.target_rustcflags).args(args);
10981095
command.env("RUSTC_BOOTSTRAP", "1");
10991096
command.envs(envs);

src/tools/compiletest/src/directives/needs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ impl CachedNeedsConditions {
367367
//
368368
// However, `rust-lld` is only located under the lib path, so we look for it there.
369369
rust_lld: config
370-
.compile_lib_path
370+
.host_compile_lib_path
371371
.parent()
372372
.expect("couldn't traverse to the parent of the specified --compile-lib-path")
373373
.join("lib")

src/tools/compiletest/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ fn parse_config(args: Vec<String>) -> Config {
375375
fail_fast: matches.opt_present("fail-fast")
376376
|| env::var_os("RUSTC_TEST_FAIL_FAST").is_some(),
377377

378-
compile_lib_path: make_absolute(opt_path(matches, "compile-lib-path")),
378+
host_compile_lib_path: make_absolute(opt_path(matches, "compile-lib-path")),
379379
run_lib_path: make_absolute(opt_path(matches, "run-lib-path")),
380380
rustc_path: opt_path(matches, "rustc-path"),
381381
cargo_path: matches.opt_str("cargo-path").map(Utf8PathBuf::from),

src/tools/compiletest/src/runtest.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ impl<'test> TestCx<'test> {
458458

459459
self.compose_and_run(
460460
rustc,
461-
self.config.compile_lib_path.as_path(),
461+
self.config.host_compile_lib_path.as_path(),
462462
Some(aux_dir.as_path()),
463463
src,
464464
)
@@ -1321,7 +1321,7 @@ impl<'test> TestCx<'test> {
13211321
self.props.unset_rustc_env.iter().fold(&mut rustc, Command::env_remove);
13221322
self.compose_and_run(
13231323
rustc,
1324-
self.config.compile_lib_path.as_path(),
1324+
self.config.host_compile_lib_path.as_path(),
13251325
Some(aux_dir.as_path()),
13261326
input,
13271327
)
@@ -1344,7 +1344,8 @@ impl<'test> TestCx<'test> {
13441344
rustc.arg("-Cpanic=abort");
13451345
rustc.args(self.props.minicore_compile_flags.clone());
13461346

1347-
let res = self.compose_and_run(rustc, self.config.compile_lib_path.as_path(), None, None);
1347+
let res =
1348+
self.compose_and_run(rustc, self.config.host_compile_lib_path.as_path(), None, None);
13481349
if !res.status.success() {
13491350
self.fatal_proc_rec(
13501351
&format!("auxiliary build of {} failed to compile: ", self.config.minicore_path),
@@ -1458,7 +1459,7 @@ impl<'test> TestCx<'test> {
14581459

14591460
let auxres = aux_cx.compose_and_run(
14601461
aux_rustc,
1461-
aux_cx.config.compile_lib_path.as_path(),
1462+
aux_cx.config.host_compile_lib_path.as_path(),
14621463
Some(aux_dir.as_path()),
14631464
None,
14641465
);

src/tools/compiletest/src/runtest/run_make.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ impl TestCx<'_> {
172172
.env(dylib_env_var(), &env::join_paths(recipe_dylib_search_paths).unwrap())
173173
// Provide the directory to libraries that are needed to run the *compiler* invoked
174174
// by the recipe.
175-
.env("HOST_RUSTC_DYLIB_PATH", &self.config.compile_lib_path)
175+
.env("HOST_RUSTC_DYLIB_PATH", &self.config.host_compile_lib_path)
176176
// Provide the directory to libraries that might be needed to run binaries created
177177
// by a compiler invoked by the recipe.
178178
.env("TARGET_EXE_DYLIB_PATH", &self.config.run_lib_path)

src/tools/compiletest/src/rustdoc_gui_test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ fn incomplete_config_for_rustdoc_gui_test() -> Config {
5858
edition: Default::default(),
5959
bless: Default::default(),
6060
fail_fast: Default::default(),
61-
compile_lib_path: Utf8PathBuf::default(),
61+
host_compile_lib_path: Utf8PathBuf::default(),
6262
run_lib_path: Utf8PathBuf::default(),
6363
rustc_path: Utf8PathBuf::default(),
6464
cargo_path: Default::default(),

0 commit comments

Comments
 (0)