aboutsummaryrefslogtreecommitdiff
path: root/src/Compilation.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2022-07-11 14:18:56 -0700
committerAndrew Kelley <andrew@ziglang.org>2022-07-11 14:18:56 -0700
commit2b99182e25e045109b090a794bb06295b09a0eeb (patch)
tree4cbb93210359b2b1f7e8359752807c8eb4dcf353 /src/Compilation.zig
parent1f410b500c8dbe33191a54a4ae02a6fb0febec46 (diff)
downloadzig-2b99182e25e045109b090a794bb06295b09a0eeb.tar.gz
zig-2b99182e25e045109b090a794bb06295b09a0eeb.zip
stage2: cleanups to --compress-debug-sections
* make the setting in the linker backend be non-optional; by this time all defaults are supposed to be resolved. * integrate with `zig cc` * change the CLI parsing to match C compiler parsing, allowing `--compress-debug-sections` alone to choose a default encoding of zlib.
Diffstat (limited to 'src/Compilation.zig')
-rw-r--r--src/Compilation.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig
index 8abe2770ec..ce8fc7dcaf 100644
--- a/src/Compilation.zig
+++ b/src/Compilation.zig
@@ -1688,7 +1688,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,
+ .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,
@@ -2461,7 +2461,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.addOptional(comp.bin_file.options.compress_debug_sections);
+ 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);