From 373179f664edaf9550ee0c1dc2637d337435f14f Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Sat, 15 Oct 2022 07:51:48 -0700 Subject: [PATCH] glfw: remove self-hosted compiler workaround Signed-off-by: Stephen Gutekanst --- libs/glfw/build.zig | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/libs/glfw/build.zig b/libs/glfw/build.zig index 7a866743..2d167466 100644 --- a/libs/glfw/build.zig +++ b/libs/glfw/build.zig @@ -69,20 +69,8 @@ pub const pkg = std.build.Pkg{ .source = .{ .path = sdkPath("/src/main.zig") }, }; -// TODO(self-hosted): HACK: workaround https://github.com/ziglang/zig/issues/12784 -// -// Extracted from a build using stage1 from zig-cache/ (`cimport/c_darwin_native.zig`) -// Then find+replace `= ?fn` -> `= ?*const fn` -fn cimportWorkaround() void { - const dest_dir = std.fs.cwd().openDir(sdkPath("/src"), .{}) catch unreachable; - const cn_path = sdkPath("/src/cimport/" ++ if (builtin.os.tag == .macos) "c_darwin_native.zig" else "c_normal_native.zig"); - std.fs.cwd().copyFile(cn_path, dest_dir, sdkPath("/src/c_native.zig"), .{}) catch unreachable; -} - pub const LinkError = error{FailedToLinkGPU} || BuildError; pub fn link(b: *Builder, step: *std.build.LibExeObjStep, options: Options) LinkError!void { - cimportWorkaround(); - const lib = try buildLibrary(b, step.build_mode, step.target, options); step.linkLibrary(lib); addGLFWIncludes(step);