aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Build/Cache
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2024-10-08 17:57:14 -0700
committerAndrew Kelley <andrew@ziglang.org>2024-10-08 18:02:59 -0700
commit31d70cb1e11cf480f4a45afdff20e4adf0d6068b (patch)
tree384541411c9b2be3192232cb90b1d43d98351c1f /lib/std/Build/Cache
parent2c41c453b634b3d1f378f6f1b335314f0a4be2de (diff)
downloadzig-31d70cb1e11cf480f4a45afdff20e4adf0d6068b.tar.gz
zig-31d70cb1e11cf480f4a45afdff20e4adf0d6068b.zip
link.Elf: avoid needless file system reads in flush()
flush() must not do anything more than necessary. Determining the type of input files must be done only once, before flush. Fortunately, we don't even need any file system accesses to do this since that information is statically known in most cases, and in the rest of the cases can be determined by file extension alone. This commit also updates the nearby code to conform to the convention for error handling where there is exactly one error code to represent the fact that error messages have already been emitted. This had the side effect of improving the error message for a linker script parse error. "positionals" is not a linker concept; it is a command line interface concept. Zig's linker implementation should not mention "positionals". This commit deletes that array list in favor of directly making function calls, eliminating that heap allocation during flush().
Diffstat (limited to 'lib/std/Build/Cache')
0 files changed, 0 insertions, 0 deletions