eliminate warnings from the linker #14967
Labels
breaking
Implementing this issue could cause existing code to no longer compile or have different behavior.
enhancement
Solving this issue will likely involve adding new logic or components to the codebase.
linking
Milestone
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.
The text was updated successfully, but these errors were encountered: