all: remove support for stage1

With almost all tests/examples working on all platforms now with the new compiler,
https://github.com/hexops/mach/issues/180, it's time to remove stage1 support.

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-09-10 00:04:36 -07:00
parent 4c3a19fc26
commit 8113ca370d
22 changed files with 86 additions and 1907 deletions

View file

@ -1,18 +1,9 @@
const gpu = @import("main.zig");
const c = if (@import("builtin").zig_backend == .stage1 or !@import("builtin").target.isDarwin())
@cImport({
@cInclude("dawn/webgpu.h");
@cInclude("mach_dawn.h");
})
else
// TODO(self-hosted): HACK: workaround https://github.com/ziglang/zig/issues/12483
//
// cd gpu/src/
// echo '#include <dawn/webgpu.h>' > tmp.c
// echo '#include "mach_dawn.h"' >> tmp.c
// zig translate-c tmp.c -I ../zig-cache/mach/gpu-dawn/release-777728f/include/ > dawn_webgpu_h.zig
@import("dawn_webgpu_h.zig");
const c = @cImport({
@cInclude("dawn/webgpu.h");
@cInclude("mach_dawn.h");
});
var procs: c.DawnProcTable = undefined;