all: employ self-hosted @cImport hack only on Darwin targets
This is an poor approximation for the host OS running Darwin, which is good enough for now. In practice this means macOS works but can't cross-compile (until the cImport issue is fixed in Zig itself), but Windows/Linux are unaffected and should be able to build natively and cross-compile. Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
01d8dc5714
commit
1e0fa20622
5 changed files with 5 additions and 5 deletions
|
|
@ -1,6 +1,6 @@
|
|||
const gpu = @import("main.zig");
|
||||
|
||||
const c = if (@import("builtin").zig_backend == .stage1)
|
||||
const c = if (@import("builtin").zig_backend == .stage1 or !@import("builtin").target.isDarwin())
|
||||
@cImport({
|
||||
@cInclude("dawn/webgpu.h");
|
||||
@cInclude("mach_dawn.h");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue