From 2b99182e25e045109b090a794bb06295b09a0eeb Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 11 Jul 2022 14:18:56 -0700 Subject: 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. --- src/Compilation.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Compilation.zig') 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); -- cgit v1.2.3