From d3f15ece74bf717778295570467a86997638bdc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matheus=20Catarino=20Fran=C3=A7a?= Date: Sun, 7 Jan 2024 11:14:08 -0300 Subject: [PATCH] MacOS linker warns fixed (no zigcc) --- build.zig | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build.zig b/build.zig index f857d63..049a6a9 100644 --- a/build.zig +++ b/build.zig @@ -441,8 +441,13 @@ fn buildLDC(b: *Builder, lib: *CompileStep, config: ldcConfig) !*RunStep { } // link flags + // GNU LD if (lib.rootModuleTarget().os.tag == .linux and !config.zig_cc) try cmds.append("-L--no-as-needed"); + // LLD (not working in zld) + if (lib.rootModuleTarget().isDarwin() and !config.zig_cc) + // https://github.com/ldc-developers/ldc/issues/4501 + try cmds.append("-L-w"); // resolve linker warnings // Darwin frameworks if (lib.rootModuleTarget().isDarwin()) {