From 8d875c7ed4ad321c25e754a388e765eb96205246 Mon Sep 17 00:00:00 2001 From: zhom <2717306+zhom@users.noreply.github.com> Date: Wed, 14 Oct 2026 19:53:21 +0400 Subject: [PATCH] test: link e2e on windows --- e2e/app/build.rs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/e2e/app/build.rs b/e2e/app/build.rs index cbb9fa4b..b2a20bc7 100644 --- a/e2e/app/build.rs +++ b/e2e/app/build.rs @@ -16,5 +16,25 @@ fn main() { println!("cargo:rustc-link-arg=/MANIFEST:EMBED"); println!("cargo:rustc-link-arg=/MANIFESTINPUT:{manifest}"); println!("cargo:rerun-if-changed={manifest}"); + + // Donut links the C runtime statically, and tauri-build puts a stub + // msvcrt.lib on the library path every dependent sees. Its link + // arguments stay with Donut, so without these the stub hides the real + // runtime and the link fails with unresolved CRT symbols. + for lib in [ + "libvcruntimed.lib", + "vcruntime.lib", + "vcruntimed.lib", + "libcmtd.lib", + "msvcrt.lib", + "msvcrtd.lib", + "libucrt.lib", + "libucrtd.lib", + ] { + println!("cargo:rustc-link-arg=/NODEFAULTLIB:{lib}"); + } + for lib in ["libcmt.lib", "libvcruntime.lib", "ucrt.lib"] { + println!("cargo:rustc-link-arg=/DEFAULTLIB:{lib}"); + } } }