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,11 +1,18 @@
pub usingnamespace @cImport({
@cInclude("hb-ft.h");
@cInclude("freetype/ftadvanc.h");
@cInclude("freetype/ftbbox.h");
@cInclude("freetype/ftbitmap.h");
@cInclude("freetype/ftcolor.h");
@cInclude("freetype/ftlcdfil.h");
@cInclude("freetype/ftsizes.h");
@cInclude("freetype/ftstroke.h");
@cInclude("freetype/fttrigon.h");
});
pub usingnamespace if (@import("builtin").zig_backend == .stage1)
@cImport({
@cInclude("hb-ft.h");
@cInclude("freetype/ftadvanc.h");
@cInclude("freetype/ftbbox.h");
@cInclude("freetype/ftbitmap.h");
@cInclude("freetype/ftcolor.h");
@cInclude("freetype/ftlcdfil.h");
@cInclude("freetype/ftsizes.h");
@cInclude("freetype/ftstroke.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