aboutsummaryrefslogtreecommitdiff
path: root/src/main.zig
diff options
context:
space:
mode:
authorRyan Liptak <squeek502@hotmail.com>2025-11-08 02:34:44 -0800
committerGitHub <noreply@github.com>2025-11-08 02:34:44 -0800
commitbe4eaed7c41fb194014d862648ff586797e39e84 (patch)
tree0125e7d1e36f1b5b342fbbb5901ddc2650b6267b /src/main.zig
parent43eb9b52ccac894023800115e8395cdb413be14a (diff)
parentda77d306b637f9ecd4ad4657978b22063c9ecf1d (diff)
downloadzig-be4eaed7c41fb194014d862648ff586797e39e84.tar.gz
zig-be4eaed7c41fb194014d862648ff586797e39e84.zip
Merge pull request #25860 from squeek502/coalesce-to-std-zig
Move/coalesce `CompressDebugSections` and `RcIncludes` enums to `std.zig`
Diffstat (limited to 'src/main.zig')
-rw-r--r--src/main.zig16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/main.zig b/src/main.zig
index ccb8935972..9606bf2c30 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -850,7 +850,7 @@ fn buildOutputType(
var disable_c_depfile = false;
var linker_sort_section: ?link.File.Lld.Elf.SortSection = null;
var linker_gc_sections: ?bool = null;
- var linker_compress_debug_sections: ?link.File.Lld.Elf.CompressDebugSections = null;
+ var linker_compress_debug_sections: ?std.zig.CompressDebugSections = null;
var linker_allow_shlib_undefined: ?bool = null;
var allow_so_scripts: bool = false;
var linker_bind_global_refs_locally: ?bool = null;
@@ -918,7 +918,7 @@ fn buildOutputType(
var extra_cflags: std.ArrayListUnmanaged([]const u8) = .empty;
var extra_rcflags: std.ArrayListUnmanaged([]const u8) = .empty;
var symbol_wrap_set: std.StringArrayHashMapUnmanaged(void) = .empty;
- var rc_includes: Compilation.RcIncludes = .any;
+ var rc_includes: std.zig.RcIncludes = .any;
var manifest_file: ?[]const u8 = null;
var linker_export_symbol_names: std.ArrayListUnmanaged([]const u8) = .empty;
@@ -1167,11 +1167,11 @@ fn buildOutputType(
} else if (mem.eql(u8, arg, "-install_name")) {
install_name = args_iter.nextOrFatal();
} else if (mem.cutPrefix(u8, arg, "--compress-debug-sections=")) |param| {
- linker_compress_debug_sections = std.meta.stringToEnum(link.File.Lld.Elf.CompressDebugSections, param) orelse {
+ linker_compress_debug_sections = std.meta.stringToEnum(std.zig.CompressDebugSections, param) orelse {
fatal("expected --compress-debug-sections=[none|zlib|zstd], found '{s}'", .{param});
};
} else if (mem.eql(u8, arg, "--compress-debug-sections")) {
- linker_compress_debug_sections = link.File.Lld.Elf.CompressDebugSections.zlib;
+ linker_compress_debug_sections = .zlib;
} else if (mem.eql(u8, arg, "-pagezero_size")) {
const next_arg = args_iter.nextOrFatal();
pagezero_size = std.fmt.parseUnsigned(u64, eatIntPrefix(next_arg, 16), 16) catch |err| {
@@ -2335,7 +2335,7 @@ fn buildOutputType(
if (it.only_arg.len == 0) {
linker_compress_debug_sections = .zlib;
} else {
- linker_compress_debug_sections = std.meta.stringToEnum(link.File.Lld.Elf.CompressDebugSections, it.only_arg) orelse {
+ linker_compress_debug_sections = std.meta.stringToEnum(std.zig.CompressDebugSections, it.only_arg) orelse {
fatal("expected [none|zlib|zstd] after --compress-debug-sections, found '{s}'", .{it.only_arg});
};
}
@@ -2523,7 +2523,7 @@ fn buildOutputType(
try linker_export_symbol_names.append(arena, linker_args_it.nextOrFatal());
} else if (mem.eql(u8, arg, "--compress-debug-sections")) {
const arg1 = linker_args_it.nextOrFatal();
- linker_compress_debug_sections = std.meta.stringToEnum(link.File.Lld.Elf.CompressDebugSections, arg1) orelse {
+ linker_compress_debug_sections = std.meta.stringToEnum(std.zig.CompressDebugSections, arg1) orelse {
fatal("expected [none|zlib|zstd] after --compress-debug-sections, found '{s}'", .{arg1});
};
} else if (mem.cutPrefix(u8, arg, "-z")) |z_rest| {
@@ -6787,8 +6787,8 @@ fn accessFrameworkPath(
return false;
}
-fn parseRcIncludes(arg: []const u8) Compilation.RcIncludes {
- return std.meta.stringToEnum(Compilation.RcIncludes, arg) orelse
+fn parseRcIncludes(arg: []const u8) std.zig.RcIncludes {
+ return std.meta.stringToEnum(std.zig.RcIncludes, arg) orelse
fatal("unsupported rc includes type: '{s}'", .{arg});
}