diff --git a/wgpu-hal/Cargo.toml b/wgpu-hal/Cargo.toml index 3a64b8e44b..119fc6ba2b 100644 --- a/wgpu-hal/Cargo.toml +++ b/wgpu-hal/Cargo.toml @@ -261,7 +261,7 @@ glutin_wgl_sys = { workspace = true, optional = true } # This doesn't support aarch64. See https://github.com/gfx-rs/wgpu/issues/6860. # # ⚠️ Keep in sync with static_dxc cfg in build.rs and cfg_alias in `wgpu` crate ⚠️ -[target.'cfg(all(windows, not(target_arch = "aarch64")))'.dependencies] +[target.'cfg(all(windows, not(target_arch = "aarch64"), target_env = "msvc"))'.dependencies] mach-dxcompiler-rs = { workspace = true, optional = true } ####################### diff --git a/wgpu-hal/build.rs b/wgpu-hal/build.rs index a89db73d53..d175dff125 100644 --- a/wgpu-hal/build.rs +++ b/wgpu-hal/build.rs @@ -24,7 +24,7 @@ fn main() { metal: { all(target_vendor = "apple", feature = "metal") }, vulkan: { all(not(target_arch = "wasm32"), feature = "vulkan") }, // ⚠️ Keep in sync with target.cfg() definition in Cargo.toml and cfg_alias in `wgpu` crate ⚠️ - static_dxc: { all(target_os = "windows", feature = "static-dxc", not(target_arch = "aarch64")) }, + static_dxc: { all(target_os = "windows", feature = "static-dxc", not(target_arch = "aarch64"), target_env = "msvc") }, supports_64bit_atomics: { target_has_atomic = "64" }, supports_ptr_atomics: { target_has_atomic = "ptr" } } diff --git a/wgpu/build.rs b/wgpu/build.rs index 9a039c2653..fd5bf693b0 100644 --- a/wgpu/build.rs +++ b/wgpu/build.rs @@ -45,7 +45,7 @@ fn main() { // its own re-export of naga, which can be used in other situations naga: { any(feature = "naga-ir", feature = "spirv", feature = "glsl") }, // ⚠️ Keep in sync with target.cfg() definition in wgpu-hal/Cargo.toml and cfg_alias in `wgpu-hal` crate ⚠️ - static_dxc: { all(target_os = "windows", feature = "static-dxc", not(target_arch = "aarch64")) }, + static_dxc: { all(target_os = "windows", feature = "static-dxc", not(target_arch = "aarch64"), target_env = "msvc") }, supports_64bit_atomics: { target_has_atomic = "64" }, custom: {any(feature = "custom")}, std: { any(