From a833bdcd7e6fcfee6e9cc33a3f7de78b16a36941 Mon Sep 17 00:00:00 2001 From: Motiejus Jakštys Date: Mon, 9 May 2022 09:44:14 +0300 Subject: [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. --- src/link.zig | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/link.zig') 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, -- cgit v1.2.3