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{...@@ -130,7 +130,7 @@ pub const ResolveError = error{
130 ZigLacksTargetSupport,130 ZigLacksTargetSupport,
131 EmittingBinaryRequiresLlvmLibrary,131 EmittingBinaryRequiresLlvmLibrary,
132 LldIncompatibleObjectFormat,132 LldIncompatibleObjectFormat,
133 LldCannotIncrementallyLink,133 LldIncompatibleWithSelfHostedBackend,
134 LtoRequiresLld,134 LtoRequiresLld,
135 SanitizeThreadRequiresLibCpp,135 SanitizeThreadRequiresLibCpp,
136 LibCRequiresLibUnwind,136 LibCRequiresLibUnwind,
...@@ -400,10 +400,10 @@ pub fn resolve(options: Options) ResolveError!Config {...@@ -400,10 +400,10 @@ pub fn resolve(options: Options) ResolveError!Config {
400 break :b true;400 break :b true;
401 }401 }
402402
403 // If there's no ZCU we aren't using the LLVM backend but403 // If we have Zig code (i.e. a ZCU) and are compiling with a self-hosted backend, then we
404 // it shouldn't influence which linker we pick404 // also need to use a self-hosted linker.
405 if (!use_llvm and options.have_zcu) {405 if (options.have_zcu and !use_llvm) {
406 if (options.use_lld == true) return error.LldCannotIncrementallyLink;406 if (options.use_lld == true) return error.LldIncompatibleWithSelfHostedBackend;
407 break :b false;407 break :b false;
408 }408 }
409409
src/main.zig+1-1
...@@ -4115,7 +4115,7 @@ fn createModule(...@@ -4115,7 +4115,7 @@ fn createModule(
4115 error.ZigLacksTargetSupport => fatal("compiler backend unavailable for the specified target", .{}),4115 error.ZigLacksTargetSupport => fatal("compiler backend unavailable for the specified target", .{}),
4116 error.EmittingBinaryRequiresLlvmLibrary => fatal("producing machine code via LLVM requires using the LLVM library", .{}),4116 error.EmittingBinaryRequiresLlvmLibrary => fatal("producing machine code via LLVM requires using the LLVM library", .{}),
4117 error.LldIncompatibleObjectFormat => fatal("using LLD to link {s} files is unsupported", .{@tagName(target.ofmt)}),4117 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", .{}),
4119 error.LtoRequiresLld => fatal("LTO requires using LLD", .{}),4119 error.LtoRequiresLld => fatal("LTO requires using LLD", .{}),
4120 error.SanitizeThreadRequiresLibCpp => fatal("thread sanitization is (for now) implemented in C++, so it requires linking libc++", .{}),4120 error.SanitizeThreadRequiresLibCpp => fatal("thread sanitization is (for now) implemented in C++, so it requires linking libc++", .{}),
4121 error.LibCRequiresLibUnwind => fatal("libc of the specified target requires linking libunwind", .{}),4121 error.LibCRequiresLibUnwind => fatal("libc of the specified target requires linking libunwind", .{}),