From 71950f8c347baeccce09acb71b8966ec1cd1ea3b Mon Sep 17 00:00:00 2001 From: pentuppup Date: Sat, 21 Feb 2026 15:58:13 -0500 Subject: [PATCH] fix error when trying to use LLD with self-hosted backend --- src/Compilation/Config.zig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Compilation/Config.zig b/src/Compilation/Config.zig index e01daa6db1f15238de4979cd37230e475112fcad..2ce5c9abbe998e1f9841309004a262fa96cd2c42 100644 --- a/src/Compilation/Config.zig +++ b/src/Compilation/Config.zig @@ -400,7 +400,9 @@ pub fn resolve(options: Options) ResolveError!Config { break :b true; } - if (options.use_llvm == false) { + // If there's no ZCU we aren't using the LLVM backend but + // it shouldn't influence which linker we pick + if (!use_llvm and options.have_zcu) { if (options.use_lld == true) return error.LldCannotIncrementallyLink; break :b false; } -- 2.54.0