freetype: improve self-hosted compiler support (use darwin @cImport workaround)

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-08-26 19:03:55 -07:00
parent 45896bd6f5
commit 8019d55fe5
2 changed files with 6215 additions and 11 deletions

View file

@ -1,4 +1,5 @@
pub usingnamespace @cImport({ pub usingnamespace if (@import("builtin").zig_backend == .stage1)
@cImport({
@cInclude("hb-ft.h"); @cInclude("hb-ft.h");
@cInclude("freetype/ftadvanc.h"); @cInclude("freetype/ftadvanc.h");
@cInclude("freetype/ftbbox.h"); @cInclude("freetype/ftbbox.h");
@ -8,4 +9,10 @@ pub usingnamespace @cImport({
@cInclude("freetype/ftsizes.h"); @cInclude("freetype/ftsizes.h");
@cInclude("freetype/ftstroke.h"); @cInclude("freetype/ftstroke.h");
@cInclude("freetype/fttrigon.h"); @cInclude("freetype/fttrigon.h");
}); })
else
// TODO(self-hosted): 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("cimport1.zig");

File diff suppressed because it is too large Load diff