From 82d56af68fd036ac237e79ca3a59ab4940a1e2ec Mon Sep 17 00:00:00 2001 From: JF Pambrun Date: Sun, 26 Oct 2025 14:09:55 -0400 Subject: [PATCH] Disable DX on gnu target. --- wgpu-hal/Cargo.toml | 2 +- wgpu-hal/build.rs | 2 +- wgpu/build.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wgpu-hal/Cargo.toml b/wgpu-hal/Cargo.toml index 3a64b8e44bc..119fc6ba2ba 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 a89db73d53c..d175dff125f 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 9a039c26531..fd5bf693b0a 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(