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:
Stephen Gutekanst 2022-08-27 11:19:57 -07:00
parent 01d8dc5714
commit 1e0fa20622
5 changed files with 5 additions and 5 deletions

View file

@ -1,4 +1,4 @@
pub usingnamespace if (@import("builtin").zig_backend == .stage1)
pub usingnamespace if (@import("builtin").zig_backend == .stage1 or !@import("builtin").target.isDarwin())
@cImport({
@cInclude("hb-ft.h");
@cInclude("freetype/ftadvanc.h");