-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Description
Extracted from #14647.
In particular, the one I ran into was this one:
Line 3808 in b4d58e9
| log.warn("directory not found for '-F{s}'", .{dir}); |
Line 3748 in b4d58e9
| 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:
Lines 1293 to 1294 in b4d58e9
| 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.