freetype: improve self-hosted compiler support (use darwin @cImport workaround)
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
45896bd6f5
commit
8019d55fe5
2 changed files with 6215 additions and 11 deletions
|
|
@ -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");
|
||||
|
|
|
|||
6197
libs/freetype/src/cimport1.zig
Normal file
6197
libs/freetype/src/cimport1.zig
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue