| author | |
| committer | |
| log | f587209e04f93ac36fdd2e4b4f831e87b240f9ae |
| tree | 8f3d30ee72e5167ab52c6a8bf8ffbc3e8042b0f5 |
| parent | 74d2536715c4d4c27d7075b9675fa330e5be02cf |
6 files changed, 13 insertions(+), 11 deletions(-)
lib/std/Build/Step/Compile.zig+1-2| ... | ... | @@ -34,8 +34,7 @@ kind: Kind, |
| 34 | 34 | major_only_filename: ?[]const u8, |
| 35 | 35 | name_only_filename: ?[]const u8, |
| 36 | 36 | formatted_panics: ?bool = null, |
| 37 | // keep in sync with src/link.zig:CompressDebugSections | |
| 38 | compress_debug_sections: enum { none, zlib, zstd } = .none, | |
| 37 | compress_debug_sections: std.zig.CompressDebugSections = .none, | |
| 39 | 38 | verbose_link: bool, |
| 40 | 39 | verbose_cc: bool, |
| 41 | 40 | bundle_compiler_rt: ?bool = null, |
lib/std/zig.zig+2| ... | ... | @@ -377,6 +377,8 @@ pub const Subsystem = enum { |
| 377 | 377 | pub const EfiRuntimeDriver: Subsystem = .efi_runtime_driver; |
| 378 | 378 | }; |
| 379 | 379 | |
| 380 | pub const CompressDebugSections = enum { none, zlib, zstd }; | |
| 381 | ||
| 380 | 382 | /// Renders a `std.Target.Cpu` value into a textual representation that can be parsed |
| 381 | 383 | /// via the `-mcpu` flag passed to the Zig compiler. |
| 382 | 384 | /// Appends the result to `buffer`. |
src/Compilation.zig+1-1| ... | ... | @@ -1730,7 +1730,7 @@ pub const CreateOptions = struct { |
| 1730 | 1730 | linker_tsaware: bool = false, |
| 1731 | 1731 | linker_nxcompat: bool = false, |
| 1732 | 1732 | linker_dynamicbase: bool = true, |
| 1733 | linker_compress_debug_sections: ?link.File.Lld.Elf.CompressDebugSections = null, | |
| 1733 | linker_compress_debug_sections: ?std.zig.CompressDebugSections = null, | |
| 1734 | 1734 | linker_module_definition_file: ?[]const u8 = null, |
| 1735 | 1735 | linker_sort_section: ?link.File.Lld.Elf.SortSection = null, |
| 1736 | 1736 | major_subsystem_version: ?u16 = null, |
src/link.zig+1-1| ... | ... | @@ -428,7 +428,7 @@ pub const File = struct { |
| 428 | 428 | tsaware: bool, |
| 429 | 429 | nxcompat: bool, |
| 430 | 430 | dynamicbase: bool, |
| 431 | compress_debug_sections: Lld.Elf.CompressDebugSections, | |
| 431 | compress_debug_sections: std.zig.CompressDebugSections, | |
| 432 | 432 | bind_global_refs_locally: bool, |
| 433 | 433 | import_symbols: bool, |
| 434 | 434 | import_table: bool, |
src/link/Lld.zig+3-2| ... | ... | @@ -95,11 +95,12 @@ pub const Elf = struct { |
| 95 | 95 | soname: ?[]const u8, |
| 96 | 96 | allow_undefined_version: bool, |
| 97 | 97 | enable_new_dtags: ?bool, |
| 98 | compress_debug_sections: CompressDebugSections, | |
| 98 | compress_debug_sections: std.zig.CompressDebugSections, | |
| 99 | 99 | bind_global_refs_locally: bool, |
| 100 | 100 | pub const HashStyle = enum { sysv, gnu, both }; |
| 101 | 101 | pub const SortSection = enum { name, alignment }; |
| 102 | pub const CompressDebugSections = enum { none, zlib, zstd }; | |
| 102 | /// Deprecated; use 'std.zig.CompressDebugSections' instead. To be removed after 0.16.0 is tagged. | |
| 103 | pub const CompressDebugSections = std.zig.CompressDebugSections; | |
| 103 | 104 | |
| 104 | 105 | fn init(comp: *Compilation, options: link.File.OpenOptions) !Elf { |
| 105 | 106 | const PtrWidth = enum { p32, p64 }; |
src/main.zig+5-5| ... | ... | @@ -850,7 +850,7 @@ fn buildOutputType( |
| 850 | 850 | var disable_c_depfile = false; |
| 851 | 851 | var linker_sort_section: ?link.File.Lld.Elf.SortSection = null; |
| 852 | 852 | var linker_gc_sections: ?bool = null; |
| 853 | var linker_compress_debug_sections: ?link.File.Lld.Elf.CompressDebugSections = null; | |
| 853 | var linker_compress_debug_sections: ?std.zig.CompressDebugSections = null; | |
| 854 | 854 | var linker_allow_shlib_undefined: ?bool = null; |
| 855 | 855 | var allow_so_scripts: bool = false; |
| 856 | 856 | var linker_bind_global_refs_locally: ?bool = null; |
| ... | ... | @@ -1167,11 +1167,11 @@ fn buildOutputType( |
| 1167 | 1167 | } else if (mem.eql(u8, arg, "-install_name")) { |
| 1168 | 1168 | install_name = args_iter.nextOrFatal(); |
| 1169 | 1169 | } else if (mem.cutPrefix(u8, arg, "--compress-debug-sections=")) |param| { |
| 1170 | linker_compress_debug_sections = std.meta.stringToEnum(link.File.Lld.Elf.CompressDebugSections, param) orelse { | |
| 1170 | linker_compress_debug_sections = std.meta.stringToEnum(std.zig.CompressDebugSections, param) orelse { | |
| 1171 | 1171 | fatal("expected --compress-debug-sections=[none|zlib|zstd], found '{s}'", .{param}); |
| 1172 | 1172 | }; |
| 1173 | 1173 | } else if (mem.eql(u8, arg, "--compress-debug-sections")) { |
| 1174 | linker_compress_debug_sections = link.File.Lld.Elf.CompressDebugSections.zlib; | |
| 1174 | linker_compress_debug_sections = .zlib; | |
| 1175 | 1175 | } else if (mem.eql(u8, arg, "-pagezero_size")) { |
| 1176 | 1176 | const next_arg = args_iter.nextOrFatal(); |
| 1177 | 1177 | pagezero_size = std.fmt.parseUnsigned(u64, eatIntPrefix(next_arg, 16), 16) catch |err| { |
| ... | ... | @@ -2335,7 +2335,7 @@ fn buildOutputType( |
| 2335 | 2335 | if (it.only_arg.len == 0) { |
| 2336 | 2336 | linker_compress_debug_sections = .zlib; |
| 2337 | 2337 | } else { |
| 2338 | linker_compress_debug_sections = std.meta.stringToEnum(link.File.Lld.Elf.CompressDebugSections, it.only_arg) orelse { | |
| 2338 | linker_compress_debug_sections = std.meta.stringToEnum(std.zig.CompressDebugSections, it.only_arg) orelse { | |
| 2339 | 2339 | fatal("expected [none|zlib|zstd] after --compress-debug-sections, found '{s}'", .{it.only_arg}); |
| 2340 | 2340 | }; |
| 2341 | 2341 | } |
| ... | ... | @@ -2523,7 +2523,7 @@ fn buildOutputType( |
| 2523 | 2523 | try linker_export_symbol_names.append(arena, linker_args_it.nextOrFatal()); |
| 2524 | 2524 | } else if (mem.eql(u8, arg, "--compress-debug-sections")) { |
| 2525 | 2525 | const arg1 = linker_args_it.nextOrFatal(); |
| 2526 | linker_compress_debug_sections = std.meta.stringToEnum(link.File.Lld.Elf.CompressDebugSections, arg1) orelse { | |
| 2526 | linker_compress_debug_sections = std.meta.stringToEnum(std.zig.CompressDebugSections, arg1) orelse { | |
| 2527 | 2527 | fatal("expected [none|zlib|zstd] after --compress-debug-sections, found '{s}'", .{arg1}); |
| 2528 | 2528 | }; |
| 2529 | 2529 | } else if (mem.cutPrefix(u8, arg, "-z")) |z_rest| { |