diff options
| author | Michael Goulet <michael@errs.io> | 2024-04-25 20:07:41 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-25 20:07:41 -0400 |
| commit | ef5e42af59bc05f9f4d3684fdd0e7e95639f0b20 (patch) | |
| tree | a2d07c41e2a9819cb2b206c2b454190f25f88d9f | |
| parent | 6f5c69e65f2e1da139b2cd204e693d80e0ad17ac (diff) | |
| parent | 29f2e271566de257a7a9c9b861c87bcba3eb3e49 (diff) | |
| download | rust-ef5e42af59bc05f9f4d3684fdd0e7e95639f0b20.tar.gz rust-ef5e42af59bc05f9f4d3684fdd0e7e95639f0b20.zip | |
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.
| -rw-r--r-- | tests/run-make/compiler-builtins/rmake.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/run-make/compiler-builtins/rmake.rs b/tests/run-make/compiler-builtins/rmake.rs index 92d6895143c..97ff12877f1 100644 --- a/tests/run-make/compiler-builtins/rmake.rs +++ b/tests/run-make/compiler-builtins/rmake.rs @@ -63,7 +63,10 @@ fn main() { .env("RUSTC", rustc) .env("RUSTFLAGS", "-Copt-level=0 -Cdebug-assertions=yes") .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); let status = cmd.status().unwrap(); |
