mach/glfw/src/c.zig
Stephen Gutekanst a707894113 glfw: pretranslate @cImport to workaround self-hosted compiler bug
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-20 12:03:17 -07:00

11 lines
399 B
Zig

pub const c = if (@import("builtin").zig_backend == .stage1)
@cImport({
@cDefine("GLFW_INCLUDE_VULKAN", "1");
@cInclude("GLFW/glfw3.h");
})
else
// HACK: workaround https://github.com/ziglang/zig/issues/12483
//
// Extracted from a build using stage1 from zig-cache/ (`cimport.zig`)
// Then find+replace `= ?fn` -> `= ?*const fn`
@import("cimport2.zig");