Skip to content

Commit eeb4c5a

Browse files
authored
Upgrade to zig 0.14.0 (#25)
1 parent 5f0e01e commit eeb4c5a

33 files changed

+3
-7433
lines changed

.zigversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.14.0-dev.2577+271452d22
1+
0.14.0

build.zig

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -230,49 +230,6 @@ pub fn build(b: *std.Build) void {
230230
imgui.addCSourceFile(.{ .file = b.path("libs/imgui_test_engine/imgui_te_perftool.cpp"), .flags = cflags });
231231
imgui.addCSourceFile(.{ .file = b.path("libs/imgui_test_engine/imgui_te_ui.cpp"), .flags = cflags });
232232
imgui.addCSourceFile(.{ .file = b.path("libs/imgui_test_engine/imgui_te_utils.cpp"), .flags = cflags });
233-
234-
// TODO: Workaround because zig on win64 doesn have phtreads
235-
// TODO: Implement corutine in zig can solve this
236-
if (target.result.os.tag == .windows) {
237-
const src: []const []const u8 = &.{
238-
"libs/winpthreads/src/nanosleep.c",
239-
"libs/winpthreads/src/cond.c",
240-
"libs/winpthreads/src/barrier.c",
241-
"libs/winpthreads/src/misc.c",
242-
"libs/winpthreads/src/clock.c",
243-
"libs/winpthreads/src/libgcc/dll_math.c",
244-
"libs/winpthreads/src/spinlock.c",
245-
"libs/winpthreads/src/thread.c",
246-
"libs/winpthreads/src/mutex.c",
247-
"libs/winpthreads/src/sem.c",
248-
"libs/winpthreads/src/sched.c",
249-
"libs/winpthreads/src/ref.c",
250-
"libs/winpthreads/src/rwlock.c",
251-
};
252-
253-
const winpthreads = b.addStaticLibrary(.{
254-
.name = "winpthreads",
255-
.optimize = optimize,
256-
.target = target,
257-
});
258-
winpthreads.want_lto = false;
259-
winpthreads.root_module.sanitize_c = false;
260-
if (optimize == .Debug or optimize == .ReleaseSafe)
261-
winpthreads.bundle_compiler_rt = true
262-
else
263-
winpthreads.root_module.strip = true;
264-
winpthreads.addCSourceFiles(.{ .files = src, .flags = &.{
265-
"-Wall",
266-
"-Wextra",
267-
} });
268-
winpthreads.root_module.addCMacro("__USE_MINGW_ANSI_STDIO", "1");
269-
winpthreads.addIncludePath(b.path("libs/winpthreads/include"));
270-
winpthreads.addIncludePath(b.path("libs/winpthreads/src"));
271-
winpthreads.linkLibC();
272-
b.installArtifact(winpthreads);
273-
imgui.linkLibrary(winpthreads);
274-
imgui.addSystemIncludePath(b.path("libs/winpthreads/include"));
275-
}
276233
}
277234

278235
switch (options.backend) {

build.zig.zon

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.{
2-
.name = "zgui",
2+
.name = .zgui,
3+
.fingerprint = 0xe78160e64acbef8,
34
.version = "0.6.0-dev",
45
.paths = .{
56
"build.zig",

0 commit comments

Comments
 (0)