Extracted from #14647.
In particular, the one I ran into was this one:
|
log.warn("directory not found for '-F{s}'", .{dir}); |
|
log.warn("directory not found for '-L{s}'", .{dir}); |
Linker code should not use std.log other than for debug messages, which are disabled in release builds. Instead, it should properly report errors back to the Compilation so that they can be dispatched accordingly. All warnings should become errors, and any such errors that users of the compiler wish to ignore must be addressed via a flag specifically choosing linker behavior to resolve the error. For example, in this case it could be -fignore-empty-lib-directories.
Another example:
|
log.warn("requested __PAGEZERO size (0x{x}) is not page aligned", .{pagezero_vmsize}); |
|
log.warn(" rounding down to 0x{x}", .{aligned_pagezero_vmsize}); |
The corresponding flag could be -ffloor-unaligned-segments.
By default, all of the issues should be reported as errors via Compilation's error message API.
Extracted from #14647.
In particular, the one I ran into was this one:
zig/src/link/MachO/zld.zig
Line 3808 in b4d58e9
zig/src/link/MachO/zld.zig
Line 3748 in b4d58e9
Linker code should not use std.log other than for debug messages, which are disabled in release builds. Instead, it should properly report errors back to the Compilation so that they can be dispatched accordingly. All warnings should become errors, and any such errors that users of the compiler wish to ignore must be addressed via a flag specifically choosing linker behavior to resolve the error. For example, in this case it could be
-fignore-empty-lib-directories.Another example:
zig/src/link/MachO/zld.zig
Lines 1293 to 1294 in b4d58e9
The corresponding flag could be
-ffloor-unaligned-segments.By default, all of the issues should be reported as errors via Compilation's error message API.