aboutsummaryrefslogtreecommitdiff
path: root/src/link.zig
diff options
context:
space:
mode:
authorMotiejus Jakštys <motiejus@jakstys.lt>2022-05-09 09:44:14 +0300
committerAndrew Kelley <andrew@ziglang.org>2022-09-08 22:30:32 -0400
commita833bdcd7e6fcfee6e9cc33a3f7de78b16a36941 (patch)
tree5b45c1662789e9743d328356167b3dce72495bfd /src/link.zig
parentab4b26d8a6a36ccf75af8e25f0a1f7b88063b76f (diff)
downloadzig-a833bdcd7e6fcfee6e9cc33a3f7de78b16a36941.tar.gz
zig-a833bdcd7e6fcfee6e9cc33a3f7de78b16a36941.zip
[ld] add --print-* for diagnostics
This adds the following for passthrough to lld: - `--print-gc-sections` - `--print-icf-sections` - `--print-map` I am not adding these to the cache manifest, since it does not change the produced artifacts. Tested with an example from #11398: it successfully prints the resulting map and the GC'd sections.
Diffstat (limited to 'src/link.zig')
-rw-r--r--src/link.zig3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/link.zig b/src/link.zig
index a8845a0d57..7439f8d59e 100644
--- a/src/link.zig
+++ b/src/link.zig
@@ -166,6 +166,9 @@ pub const Options = struct {
version_script: ?[]const u8,
soname: ?[]const u8,
llvm_cpu_features: ?[*:0]const u8,
+ print_gc_sections: bool,
+ print_icf_sections: bool,
+ print_map: bool,
objects: []Compilation.LinkObject,
framework_dirs: []const []const u8,