From 541128dcb374c7eaa36872eb3a9085c401db7938 Mon Sep 17 00:00:00 2001 From: Aaron Hill Date: Sun, 23 Oct 2022 19:32:33 -0500 Subject: [PATCH] Override linker in cargotest on windows --- src/tools/cargotest/main.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/tools/cargotest/main.rs b/src/tools/cargotest/main.rs index 61ccc51580f8b..7044cb8928694 100644 --- a/src/tools/cargotest/main.rs +++ b/src/tools/cargotest/main.rs @@ -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();