]> git.lizzy.rs Git - rust.git/commitdiff
Override linker in cargotest on windows
authorAaron Hill <aa1ronham@gmail.com>
Mon, 24 Oct 2022 00:32:33 +0000 (19:32 -0500)
committerAaron Hill <aa1ronham@gmail.com>
Mon, 24 Oct 2022 00:33:03 +0000 (19:33 -0500)
src/tools/cargotest/main.rs

index 61ccc51580f8bad2a0a13cade42a5988e715eea1..7044cb8928694fa16c958fed9bc8d5ba792c68b4 100644 (file)
@@ -206,6 +206,10 @@ fn run_cargo_test(
         .env("CFG_DISABLE_CROSS_TESTS", "1")
         // Relax #![deny(warnings)] in some crates
         .env("RUSTFLAGS", "--cap-lints warn")
+        // servo tries to use 'lld-link.exe' on windows, but we don't
+        // have lld on our PATH in CI. Override it to use 'link.exe'
+        .env("CARGO_TARGET_X86_64_PC_WINDOWS_MSVC_LINKER", "link.exe")
+        .env("CARGO_TARGET_I686_PC_WINDOWS_MSVC_LINKER", "link.exe")
         .current_dir(crate_path)
         .status()
         .unwrap();