gpu-dawn: workaround missing pthread issue in abseil-cpp

abseil-cpp now depends on `pthread.h`, it previously didn't. But this appears to
be a bug in abseil of sorts, because if you have `ABSL_FORCE_THREAD_IDENTITY_MODE` set
to `ABSL_THREAD_IDENTITY_MODE_USE_CPP11` it doesn't appear to be used/needed.

[Zig doesn't ship with pthread for the MinGW / `x86_64-windows-gnu` target](https://github.com/ziglang/zig/issues/10989),
and so the header is missing - but we don't actually need it, so we just add an
empty file to prevent the missing include error.

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-08-06 17:52:51 -07:00
parent f4611e1414
commit 5aa692b4e5
2 changed files with 1 additions and 0 deletions

View file

@ -1130,6 +1130,7 @@ fn buildLibAbseilCpp(b: *Builder, step: *std.build.LibExeObjStep, options: Optio
"-DD3D10_ARBITRARY_HEADER_ORDERING",
"-D_CRT_SECURE_NO_WARNINGS",
"-DNOMINMAX",
include("src/dawn/zig_mingw_pthread"),
}) catch unreachable;
// absl