zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 7c718fc72e23130b3093ccec7d644ee94017f3d6 (tree)
parent 088f815031dd3570c9cc179e193cbd545e5bb3a3
Author: Andrew Kelley <andrew@ziglang.org>
Date:   Sun, 19 Apr 2026 10:56:24 -0700

fix compilation errors from rebase conflicts

Diffstat:
MBRANCH_TODO | 30++----------------------------
Mlib/compiler/Maker/Graph.zig | 3+++
Mlib/compiler/configurer.zig | 2+-
Mlib/std/Build.zig | 10----------
Mlib/std/Build/Cache.zig | 2+-
Mlib/std/Build/Step/InstallArtifact.zig | 4----
6 files changed, 7 insertions(+), 44 deletions(-)

diff --git a/BRANCH_TODO b/BRANCH_TODO @@ -13,6 +13,8 @@ * refactor with DefaultingEnum * inspect b4ffb402c082605c4b324e88120306fc8fb3cf32 diff and apply changes as needed (merge conflict) * https://codeberg.org/ziglang/zig/issues/31397 +* restore the generated_compiler_rt_dyn_lib hack? +* run args ## Followup Issues * link_eh_frame_hdr should be DefaultingBool @@ -21,31 +23,3 @@ - but artifact install steps also add paths for dyn libs on windows - -## Unresolved Branch Conflicts - -* move max_jobs to maker not configurer - -+// hack for stage2_x86_64 + coff -+generated_compiler_rt_dyn_lib: ?*GeneratedFile, - -+ // hack for stage2_x86_64 + coff -+ if (compile.generated_compiler_rt_dyn_lib) |lp| lp.path = compile.outputPath(output_dir, .compiler_rt_dyn_lib); - - if (install_artifact.compiler_rt_dyn_lib_dir) |compiler_rt_dir| { - const full_compiler_rt_path = b.getInstallPath(compiler_rt_dir, install_artifact.emitted_compiler_rt_dyn_lib.?.basename(b, step)); - const p = try step.installFile(install_artifact.emitted_compiler_rt_dyn_lib.?, full_compiler_rt_path); - all_cached = all_cached and p == .fresh; - } - - - .compiler_rt_dyn_lib_dir = switch (options.compiler_rt_dyn_lib_dir) { - .disabled => null, - .default => if (artifact.producesCompilerRtDynLib()) dest_dir else null, - .override => |o| o, - }, - - if (install_artifact.compiler_rt_dyn_lib_dir != null) install_artifact.emitted_compiler_rt_dyn_lib = artifact.getEmittedCompilerRtDynLib(); - - - diff --git a/lib/compiler/Maker/Graph.zig b/lib/compiler/Maker/Graph.zig @@ -48,6 +48,9 @@ sysroot: ?[]const u8 = null, search_prefixes: std.ArrayList([]const u8) = .empty, build_id: ?std.zig.BuildId = null, error_limit: ?u32 = null, +/// Steps should use `io` to limit the number of jobs, however in the case of +/// a single step spawning a fixed number of processes this can be used. +max_jobs: ?u32 = null, /// Intention of verbose is to print all sub-process command lines to stderr /// before spawning them. diff --git a/lib/compiler/configurer.zig b/lib/compiler/configurer.zig @@ -952,7 +952,7 @@ fn serialize(b: *std.Build, wc: *Configuration.Wip, writer: *Io.Writer) !void { .expect_term => |t| expect_term = switch (t) { .exited => |x| .{ .status = .exited, .value = x }, .signal => |x| .{ .status = .signal, .value = @intFromEnum(x) }, - .stopped => |x| .{ .status = .stopped, .value = x }, + .stopped => |x| .{ .status = .stopped, .value = @intFromEnum(x) }, .unknown => |x| .{ .status = .unknown, .value = x }, }, }, diff --git a/lib/std/Build.zig b/lib/std/Build.zig @@ -32,13 +32,6 @@ allocator: Allocator, user_input_options: UserInputOptionsMap, available_options_map: AvailableOptionsMap, available_options_list: std.array_list.Managed(AvailableOption), -verbose: bool, -verbose_link: bool, -verbose_cc: bool, -verbose_air: bool, -verbose_llvm_ir: ?[]const u8, -verbose_llvm_bc: ?[]const u8, -verbose_llvm_cpu_features: bool, invalid_user_input: bool, default_step: *Step, top_level_steps: std.StringArrayHashMapUnmanaged(*Step.TopLevel), @@ -100,9 +93,6 @@ pub const Graph = struct { host: ResolvedTarget, dependency_cache: InitializedDepMap = .empty, allow_so_scripts: ?bool = null, - /// Steps should use `io` to limit the number of jobs, however in the case of - /// a single step spawning a fixed number of processes this can be used. - max_jobs: ?u32 = null, time_report: bool = false, /// Similar to the `Io.Terminal.Mode` returned by `Io.lockStderr`, but also /// respects the '--color' flag. diff --git a/lib/std/Build/Cache.zig b/lib/std/Build/Cache.zig @@ -195,7 +195,7 @@ pub const HashHelper = struct { } pub fn addBytesZ(hh: *HashHelper, bytes: [:0]const u8) void { - hh.hasher.update(mem.absorbSentinel(u8, 0, bytes)); + hh.hasher.update(mem.absorbSentinel(bytes)); } pub fn addOptionalBytes(hh: *HashHelper, optional_bytes: ?[]const u8) void { diff --git a/lib/std/Build/Step/InstallArtifact.zig b/lib/std/Build/Step/InstallArtifact.zig @@ -17,10 +17,6 @@ emitted_implib: ?LazyPath, pdb_dir: ?InstallDir, emitted_pdb: ?LazyPath, -// hack for stage2_x86_64 + coff -compiler_rt_dyn_lib_dir: ?InstallDir, -emitted_compiler_rt_dyn_lib: ?LazyPath, - h_dir: ?InstallDir, emitted_h: ?LazyPath,