Rollup merge of #124378 - dpaoliello:keeplib, r=jieyouxu
Keep the LIB env var in the compiler-builtins test The `tests/run-make/compiler-builtins` test was failing for me with Visual Studio 2022, complaining that it couldn't find `kernel32.lib`. For whatever reason, with VS 2022 we need to keep the `LIB` environment variable when invoking Cargo so that the linker can find the Windows SDK libs.
This commit is contained in:
commit
ef5e42af59
@ -63,7 +63,10 @@ fn main() {
|
|||||||
.env("RUSTC", rustc)
|
.env("RUSTC", rustc)
|
||||||
.env("RUSTFLAGS", "-Copt-level=0 -Cdebug-assertions=yes")
|
.env("RUSTFLAGS", "-Copt-level=0 -Cdebug-assertions=yes")
|
||||||
.env("CARGO_TARGET_DIR", &target_dir)
|
.env("CARGO_TARGET_DIR", &target_dir)
|
||||||
.env("RUSTC_BOOTSTRAP", "1");
|
.env("RUSTC_BOOTSTRAP", "1")
|
||||||
|
// Visual Studio 2022 requires that the LIB env var be set so it can
|
||||||
|
// find the Windows SDK.
|
||||||
|
.env("LIB", std::env::var("LIB").unwrap_or_default());
|
||||||
set_host_rpath(&mut cmd);
|
set_host_rpath(&mut cmd);
|
||||||
|
|
||||||
let status = cmd.status().unwrap();
|
let status = cmd.status().unwrap();
|
||||||
|
Loading…
Reference in New Issue
Block a user