about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume.gomez@huawei.com>2024-06-02 11:51:08 +0200
committerGuillaume Gomez <guillaume.gomez@huawei.com>2024-07-22 23:22:53 +0200
commit7e0c203f2d4320ad2299a78f6d1dc8ae00cf5bc8 (patch)
tree597080e892aa37b714e10cb7236fdb08b645e5b4
parent2a1c384f0e44ad01ac5c85f0cd9de58c97981974 (diff)
downloadrust-7e0c203f2d4320ad2299a78f6d1dc8ae00cf5bc8.tar.gz
rust-7e0c203f2d4320ad2299a78f6d1dc8ae00cf5bc8.zip
Add new `MSVC_LIB_PATH` runtest environment variable to know location of the `msvc_lib` binary
-rw-r--r--src/tools/compiletest/src/runtest.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
index 53988203136..7e7f98a1354 100644
--- a/src/tools/compiletest/src/runtest.rs
+++ b/src/tools/compiletest/src/runtest.rs
@@ -3382,6 +3382,7 @@ impl<'test> TestCx<'test> {
             cmd.env("IS_MSVC", "1")
                 .env("IS_WINDOWS", "1")
                 .env("MSVC_LIB", format!("'{}' -nologo", lib.display()))
+                .env("MSVC_LIB_PATH", format!("{}", lib.display()))
                 .env("CC", format!("'{}' {}", self.config.cc, cflags))
                 .env("CXX", format!("'{}' {}", &self.config.cxx, cxxflags));
         } else {
@@ -3752,6 +3753,7 @@ impl<'test> TestCx<'test> {
             cmd.env("IS_MSVC", "1")
                 .env("IS_WINDOWS", "1")
                 .env("MSVC_LIB", format!("'{}' -nologo", lib.display()))
+                .env("MSVC_LIB_PATH", format!("{}", lib.display()))
                 // Note: we diverge from legacy run_make and don't lump `CC` the compiler and
                 // default flags together.
                 .env("CC_DEFAULT_FLAGS", &cflags)