From 95eb37a198271373b9c4918ce885bb959418e67e Mon Sep 17 00:00:00 2001 From: Matthew Lugg Date: Sun, 31 May 2026 08:21:13 +0100 Subject: [PATCH] Compilation.Config: do not default to '-flld' if '-fnew-linker' given This causes a confusing CLI error. --- src/Compilation/Config.zig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Compilation/Config.zig b/src/Compilation/Config.zig index 2ce5c9abbe998e1f9841309004a262fa96cd2c42..62dfca1e4ba78962110220f42002d6effdb5af6a 100644 --- a/src/Compilation/Config.zig +++ b/src/Compilation/Config.zig @@ -409,6 +409,10 @@ pub fn resolve(options: Options) ResolveError!Config { if (options.use_lld) |x| break :b x; + // If the user didn't specify whether to use LLD but did specify to use the new linker, + // assume no LLD. + if (options.use_new_linker == true) break :b false; + // If we have no zig code to compile, no need for the self-hosted linker. if (!options.have_zcu) break :b true; -- 2.54.0