all: revert cimport workaround

This commit is contained in:
Ali Chraghi 2022-09-07 23:48:43 +04:30 committed by Stephen Gutekanst
parent 0a32de381e
commit ad981944d4
12 changed files with 29 additions and 94228 deletions

View file

@ -1,17 +1,10 @@
pub usingnamespace if (@import("builtin").zig_backend == .stage1 or !@import("builtin").target.isDarwin())
@cImport({
@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");
pub usingnamespace @cImport({
@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");
});

File diff suppressed because it is too large Load diff

View file

@ -1,8 +1 @@
pub usingnamespace if (@import("builtin").zig_backend == .stage1 or !@import("builtin").target.isDarwin())
@cImport(@cInclude("hb-ft.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");
pub usingnamespace @cImport(@cInclude("hb-ft.h"));

File diff suppressed because it is too large Load diff