Respect COMPILETEST_FORCE_STAGE0 sysroot when compiling rmake.rs
This commit is contained in:
parent
b054da8155
commit
43de44d538
@ -3803,36 +3803,42 @@ fn run_rmake_v2_test(&self) {
|
|||||||
debug!(?support_lib_deps);
|
debug!(?support_lib_deps);
|
||||||
debug!(?support_lib_deps_deps);
|
debug!(?support_lib_deps_deps);
|
||||||
|
|
||||||
let res = self.cmd2procres(
|
let mut cmd = Command::new(&self.config.rustc_path);
|
||||||
Command::new(&self.config.rustc_path)
|
cmd.arg("-o")
|
||||||
.arg("-o")
|
.arg(&recipe_bin)
|
||||||
.arg(&recipe_bin)
|
.arg(format!("-Ldependency={}", &support_lib_path.parent().unwrap().to_string_lossy()))
|
||||||
.arg(format!(
|
.arg(format!("-Ldependency={}", &support_lib_deps.to_string_lossy()))
|
||||||
"-Ldependency={}",
|
.arg(format!("-Ldependency={}", &support_lib_deps_deps.to_string_lossy()))
|
||||||
&support_lib_path.parent().unwrap().to_string_lossy()
|
.arg("--extern")
|
||||||
))
|
.arg(format!("run_make_support={}", &support_lib_path.to_string_lossy()))
|
||||||
.arg(format!("-Ldependency={}", &support_lib_deps.to_string_lossy()))
|
.arg(&self.testpaths.file.join("rmake.rs"))
|
||||||
.arg(format!("-Ldependency={}", &support_lib_deps_deps.to_string_lossy()))
|
.env("TARGET", &self.config.target)
|
||||||
.arg("--extern")
|
.env("PYTHON", &self.config.python)
|
||||||
.arg(format!("run_make_support={}", &support_lib_path.to_string_lossy()))
|
.env("S", &src_root)
|
||||||
.arg(&self.testpaths.file.join("rmake.rs"))
|
.env("RUST_BUILD_STAGE", &self.config.stage_id)
|
||||||
.env("TARGET", &self.config.target)
|
.env("RUSTC", cwd.join(&self.config.rustc_path))
|
||||||
.env("PYTHON", &self.config.python)
|
.env("TMPDIR", &tmpdir)
|
||||||
.env("S", &src_root)
|
.env("LD_LIB_PATH_ENVVAR", dylib_env_var())
|
||||||
.env("RUST_BUILD_STAGE", &self.config.stage_id)
|
.env("HOST_RPATH_DIR", cwd.join(&self.config.compile_lib_path))
|
||||||
.env("RUSTC", cwd.join(&self.config.rustc_path))
|
.env("TARGET_RPATH_DIR", cwd.join(&self.config.run_lib_path))
|
||||||
.env("TMPDIR", &tmpdir)
|
.env("LLVM_COMPONENTS", &self.config.llvm_components)
|
||||||
.env("LD_LIB_PATH_ENVVAR", dylib_env_var())
|
// We for sure don't want these tests to run in parallel, so make
|
||||||
.env("HOST_RPATH_DIR", cwd.join(&self.config.compile_lib_path))
|
// sure they don't have access to these vars if we run via `make`
|
||||||
.env("TARGET_RPATH_DIR", cwd.join(&self.config.run_lib_path))
|
// at the top level
|
||||||
.env("LLVM_COMPONENTS", &self.config.llvm_components)
|
.env_remove("MAKEFLAGS")
|
||||||
// We for sure don't want these tests to run in parallel, so make
|
.env_remove("MFLAGS")
|
||||||
// sure they don't have access to these vars if we run via `make`
|
.env_remove("CARGO_MAKEFLAGS");
|
||||||
// at the top level
|
|
||||||
.env_remove("MAKEFLAGS")
|
if std::env::var_os("COMPILETEST_FORCE_STAGE0").is_some() {
|
||||||
.env_remove("MFLAGS")
|
let mut stage0_sysroot = build_root.clone();
|
||||||
.env_remove("CARGO_MAKEFLAGS"),
|
stage0_sysroot.push("stage0-sysroot");
|
||||||
);
|
debug!(?stage0_sysroot);
|
||||||
|
debug!(exists = stage0_sysroot.exists());
|
||||||
|
|
||||||
|
cmd.arg("--sysroot").arg(&stage0_sysroot);
|
||||||
|
}
|
||||||
|
|
||||||
|
let res = self.cmd2procres(&mut cmd);
|
||||||
if !res.status.success() {
|
if !res.status.success() {
|
||||||
self.fatal_proc_rec("run-make test failed: could not build `rmake.rs` recipe", &res);
|
self.fatal_proc_rec("run-make test failed: could not build `rmake.rs` recipe", &res);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user