Skip to content

Commit 0a99be6

Browse files
authored
Disable DX on gnu target. (#8430)
1 parent b599252 commit 0a99be6

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

wgpu-hal/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,9 +260,10 @@ glutin_wgl_sys = { workspace = true, optional = true }
260260

261261
### Platform: x86/x86_64 Windows ###
262262
# This doesn't support aarch64. See https://github.com/gfx-rs/wgpu/issues/6860.
263+
# This doesn't support x86_64-pc-windows-gnu. See https://github.com/gfx-rs/wgpu/issues/8303
263264
#
264265
# ⚠️ Keep in sync with static_dxc cfg in build.rs and cfg_alias in `wgpu` crate ⚠️
265-
[target.'cfg(all(windows, not(target_arch = "aarch64")))'.dependencies]
266+
[target.'cfg(all(windows, not(target_arch = "aarch64"), target_env = "msvc"))'.dependencies]
266267
mach-dxcompiler-rs = { workspace = true, optional = true }
267268

268269
#######################

wgpu-hal/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ fn main() {
2424
metal: { all(target_vendor = "apple", feature = "metal") },
2525
vulkan: { all(not(target_arch = "wasm32"), feature = "vulkan") },
2626
// ⚠️ Keep in sync with target.cfg() definition in Cargo.toml and cfg_alias in `wgpu` crate ⚠️
27-
static_dxc: { all(target_os = "windows", feature = "static-dxc", not(target_arch = "aarch64")) },
27+
static_dxc: { all(target_os = "windows", feature = "static-dxc", not(target_arch = "aarch64"), target_env = "msvc") },
2828
supports_64bit_atomics: { target_has_atomic = "64" },
2929
supports_ptr_atomics: { target_has_atomic = "ptr" }
3030
}

wgpu/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ fn main() {
4545
// its own re-export of naga, which can be used in other situations
4646
naga: { any(feature = "naga-ir", feature = "spirv", feature = "glsl") },
4747
// ⚠️ Keep in sync with target.cfg() definition in wgpu-hal/Cargo.toml and cfg_alias in `wgpu-hal` crate ⚠️
48-
static_dxc: { all(target_os = "windows", feature = "static-dxc", not(target_arch = "aarch64")) },
48+
static_dxc: { all(target_os = "windows", feature = "static-dxc", not(target_arch = "aarch64"), target_env = "msvc") },
4949
supports_64bit_atomics: { target_has_atomic = "64" },
5050
custom: {any(feature = "custom")},
5151
std: { any(

0 commit comments

Comments
 (0)