@@ -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 ) {
0 commit comments