authorgravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2026-06-02 07:27:10+01:00
committergravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2026-06-04 09:57:29+01:00
log4a2a9e9d24b71bd0bea80aaf88205039ae77c8df
treefe4b661b5e257e3281607b580cddc587e54297df
parent41a617990513a0b6a0ad1f10ca8b78f9ea69cb28
signaturelock-open Commit is signed but in an unrecognized format.

Compilation.Config: rename an error

The old error name didn't align with the actual message we emitted, and kept confusing me.

2 files changed, 6 insertions(+), 6 deletions(-)

src/Compilation/Config.zig+5-5
......@@ -130,7 +130,7 @@ pub const ResolveError = error{
130130 ZigLacksTargetSupport,
131131 EmittingBinaryRequiresLlvmLibrary,
132132 LldIncompatibleObjectFormat,
133 LldCannotIncrementallyLink,
133 LldIncompatibleWithSelfHostedBackend,
134134 LtoRequiresLld,
135135 SanitizeThreadRequiresLibCpp,
136136 LibCRequiresLibUnwind,
......@@ -400,10 +400,10 @@ pub fn resolve(options: Options) ResolveError!Config {
400400 break :b true;
401401 }
402402
403 // If there's no ZCU we aren't using the LLVM backend but
404 // it shouldn't influence which linker we pick
405 if (!use_llvm and options.have_zcu) {
406 if (options.use_lld == true) return error.LldCannotIncrementallyLink;
403 // If we have Zig code (i.e. a ZCU) and are compiling with a self-hosted backend, then we
404 // also need to use a self-hosted linker.
405 if (options.have_zcu and !use_llvm) {
406 if (options.use_lld == true) return error.LldIncompatibleWithSelfHostedBackend;
407407 break :b false;
408408 }
409409
src/main.zig+1-1
......@@ -4115,7 +4115,7 @@ fn createModule(
41154115 error.ZigLacksTargetSupport => fatal("compiler backend unavailable for the specified target", .{}),
41164116 error.EmittingBinaryRequiresLlvmLibrary => fatal("producing machine code via LLVM requires using the LLVM library", .{}),
41174117 error.LldIncompatibleObjectFormat => fatal("using LLD to link {s} files is unsupported", .{@tagName(target.ofmt)}),
4118 error.LldCannotIncrementallyLink => fatal("self-hosted backends do not support linking with LLD", .{}),
4118 error.LldIncompatibleWithSelfHostedBackend => fatal("self-hosted backends do not support linking with LLD", .{}),
41194119 error.LtoRequiresLld => fatal("LTO requires using LLD", .{}),
41204120 error.SanitizeThreadRequiresLibCpp => fatal("thread sanitization is (for now) implemented in C++, so it requires linking libc++", .{}),
41214121 error.LibCRequiresLibUnwind => fatal("libc of the specified target requires linking libunwind", .{}),