From 6446dd782ef8c6adeb3503cab0ecc62da86ab8f7 Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Sat, 11 Sep 2021 20:16:27 -0700 Subject: [PATCH] glfw: remove macOS sysroot workaround (not needed in latest Zig) Also, removing is required in order to workaround an issue with includes. Signed-off-by: Stephen Gutekanst --- glfw/build.zig | 6 ------ 1 file changed, 6 deletions(-) diff --git a/glfw/build.zig b/glfw/build.zig index c387bd6..f8a1e2c 100644 --- a/glfw/build.zig +++ b/glfw/build.zig @@ -243,12 +243,6 @@ fn includeSdkMacOS(b: *Builder, step: *std.build.LibExeObjStep) void { var sdk_root_libs = std.fs.path.join(b.allocator, &.{ sdk_root_dir, "root/usr/lib" }) catch unreachable; defer b.allocator.free(sdk_root_libs); step.addLibPath(sdk_root_libs); - - // TODO(slimsag): Without setting sysroot, zld fails to resolve /usr/lib/libobjc.A.dylib when specifying -Dtarget=x86_64-macos - // Presumably has something to do with https://github.com/ziglang/zig/issues/6996 - I think zld doesn't consider addLibPath/addFrameworkDir - // resolution as part of dependant libs: https://github.com/ziglang/zig/blob/2d855745f91852af92ad970feef96e55919993d3/src/link/MachO/Dylib.zig#L477-L483 - var sdk_sysroot = std.fs.path.join(b.allocator, &.{ sdk_root_dir, "root/" }) catch unreachable; - b.sysroot = sdk_sysroot; // TODO(slimsag): leaks, b.sysroot doesn't get free'd by builder? } fn includeSdkLinuxX8664(b: *Builder, step: *std.build.LibExeObjStep) void {