Skip to content

Commit f6005a1

Browse files
authored
Include FreeBSD in conditional compile attributes (#8246)
1 parent 0b38e96 commit f6005a1

File tree

5 files changed

+12
-5
lines changed

5 files changed

+12
-5
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,13 @@ jobs:
127127
tier: 1
128128
kind: native
129129

130+
# FreeBSD
131+
- name: FreeBSD x86_64
132+
os: ubuntu-24.04
133+
target: x86_64-unknown-freebsd
134+
tier: 2
135+
kind: wgpu-only
136+
130137
# Android
131138
- name: Android aarch64
132139
os: ubuntu-24.04

wgpu-core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ wgpu-core-deps-apple = { workspace = true, optional = true }
161161
wgpu-core-deps-emscripten = { workspace = true, optional = true }
162162
[target.'cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))'.dependencies]
163163
wgpu-core-deps-wasm = { workspace = true, optional = true }
164-
[target.'cfg(any(windows, target_os = "linux", target_os = "android"))'.dependencies]
164+
[target.'cfg(any(windows, target_os = "linux", target_os = "android", target_os = "freebsd"))'.dependencies]
165165
wgpu-core-deps-windows-linux-android = { workspace = true, optional = true }
166166

167167
[dependencies]

wgpu-core/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
fn main() {
22
cfg_aliases::cfg_aliases! {
3-
windows_linux_android: { any(windows, target_os = "linux", target_os = "android") },
3+
windows_linux_android: { any(windows, target_os = "linux", target_os = "android", target_os = "freebsd") },
44
send_sync: { all(
55
feature = "std",
66
any(

wgpu-core/platform-deps/windows-linux-android/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ dx12 = ["wgpu-hal/dx12"]
2323
renderdoc = ["wgpu-hal/renderdoc"]
2424

2525
# Depend on wgpu-hal conditionally, so that the above features only apply to wgpu-hal on this set of platforms.
26-
[target.'cfg(any(windows, target_os = "linux", target_os = "android"))'.dependencies]
26+
[target.'cfg(any(windows, target_os = "linux", target_os = "android", target_os = "freebsd"))'.dependencies]
2727
wgpu-hal.workspace = true

wgpu/build.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ fn main() {
1616
metal: { all(target_vendor = "apple", feature = "metal") },
1717
vulkan: { any(
1818
// The `vulkan` feature enables the Vulkan backend only on "native Vulkan" platforms, i.e. Windows/Linux/Android
19-
all(any(windows, target_os = "linux", target_os = "android"), feature = "vulkan"),
19+
all(any(windows, target_os = "linux", target_os = "android", target_os = "freebsd"), feature = "vulkan"),
2020
// On Apple platforms, however, we require the `vulkan-portability` feature
2121
// to explicitly opt-in to Vulkan since it's meant to be used with MoltenVK.
2222
all(target_vendor = "apple", feature = "vulkan-portability")
2323
) },
2424
gles: { any(
2525
// The `gles` feature enables the OpenGL/GLES backend only on "native OpenGL" platforms, i.e. Windows, Linux, Android, and Emscripten.
2626
// (Note that WebGL is also not included here!)
27-
all(any(windows, target_os = "linux", target_os = "android", Emscripten), feature = "gles"),
27+
all(any(windows, target_os = "linux", target_os = "android", target_os = "freebsd", Emscripten), feature = "gles"),
2828
// On Apple platforms, however, we require the `angle` feature to explicitly opt-in to OpenGL
2929
// since its meant to be used with ANGLE.
3030
all(target_vendor = "apple", feature = "angle")

0 commit comments

Comments
 (0)