aboutsummaryrefslogtreecommitdiff
path: root/src/Compilation.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2022-07-11 17:23:02 -0400
committerGitHub <noreply@github.com>2022-07-11 17:23:02 -0400
commit8b3f15f21824e77e776336d8be5832502946621b (patch)
tree691781676c3ad9e7c4fad03a4b4f34a4be8853d2 /src/Compilation.zig
parentda75eb0d7909b53aea78cbe5c9165f6621ccc9fa (diff)
parent2b99182e25e045109b090a794bb06295b09a0eeb (diff)
downloadzig-8b3f15f21824e77e776336d8be5832502946621b.tar.gz
zig-8b3f15f21824e77e776336d8be5832502946621b.zip
Merge pull request #11863 from motiejus/compress-debug-sections
ELF: understand --compress-debug-sections
Diffstat (limited to 'src/Compilation.zig')
-rw-r--r--src/Compilation.zig3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig
index a0506e78e2..51e85f37bb 100644
--- a/src/Compilation.zig
+++ b/src/Compilation.zig
@@ -881,6 +881,7 @@ pub const InitOptions = struct {
linker_nxcompat: bool = false,
linker_dynamicbase: bool = false,
linker_optimization: ?u8 = null,
+ linker_compress_debug_sections: ?link.CompressDebugSections = null,
major_subsystem_version: ?u32 = null,
minor_subsystem_version: ?u32 = null,
clang_passthrough_mode: bool = false,
@@ -1708,6 +1709,7 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation {
.no_builtin = options.no_builtin,
.allow_shlib_undefined = options.linker_allow_shlib_undefined,
.bind_global_refs_locally = options.linker_bind_global_refs_locally orelse false,
+ .compress_debug_sections = options.linker_compress_debug_sections orelse .none,
.import_memory = options.linker_import_memory orelse false,
.import_table = options.linker_import_table,
.export_table = options.linker_export_table,
@@ -2480,6 +2482,7 @@ fn addNonIncrementalStuffToCacheManifest(comp: *Compilation, man: *Cache.Manifes
man.hash.add(comp.bin_file.options.z_now);
man.hash.add(comp.bin_file.options.z_relro);
man.hash.add(comp.bin_file.options.hash_style);
+ man.hash.add(comp.bin_file.options.compress_debug_sections);
man.hash.add(comp.bin_file.options.include_compiler_rt);
if (comp.bin_file.options.link_libc) {
man.hash.add(comp.bin_file.options.libc_installation != null);