From 4be8fc422faf251ca5e8dc7b715bd5af8419dba2 Mon Sep 17 00:00:00 2001 From: "w.pomp" Date: Thu, 29 Oct 2026 14:18:52 +0100 Subject: [PATCH] - derive the xwin SDK lib arch dir from TARGET instead of hardcoding x86_64, so the Windowscodecs.lib case-symlink shim also applies to aarch64 (and any other) target --- build.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build.rs b/build.rs index 719c15e..7328564 100644 --- a/build.rs +++ b/build.rs @@ -90,7 +90,10 @@ fn fix_xwin_lib_case() -> Result<(), Box> { .and_then(|p| p.parent()) .ok_or(Error::msg("cannot determine cargo-xwin base dir"))?; - let xwin_sdk_lib = cargo_xwin_base.join("xwin/sdk/lib/um/x86_64"); + let arch = env::var("TARGET") + .map(|t| t.split('-').next().unwrap_or_default().to_string()) + .unwrap_or_default(); + let xwin_sdk_lib = cargo_xwin_base.join("xwin/sdk/lib/um").join(arch); if !xwin_sdk_lib.exists() { return Ok(()); }