diff --git a/build.zig b/build.zig index 06acd0fa3..9f6d06a5d 100644 --- a/build.zig +++ b/build.zig @@ -6,10 +6,10 @@ const zls_version = std.SemanticVersion.parse(@import("build.zig.zon").version) const minimum_build_zig_version = @import("build.zig.zon").minimum_zig_version; /// Specify the minimum Zig version that is usable with ZLS: -/// std.Threaded: replace more kernel32 functions with ntdll +/// rework fuzz testing to be smith based /// /// A breaking change to the Zig Build System should be handled by updating ZLS's build runner (see src\build_runner) -const minimum_runtime_zig_version = "0.16.0-dev.2535+b5bd49460"; +const minimum_runtime_zig_version = "0.16.0-dev.2669+e0173c2ce"; const release_targets = [_]std.Target.Query{ .{ .cpu_arch = .aarch64, .os_tag = .linux }, diff --git a/build.zig.zon b/build.zig.zon index 499eda875..14df4464a 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -10,7 +10,7 @@ // nix flake update --commit-lock-file // ``` // If you do not use Nix, a ZLS maintainer can take care of this. - .minimum_zig_version = "0.16.0-dev.2535+b5bd49460", + .minimum_zig_version = "0.16.0-dev.2676+4e2cec265", // If you do not use Nix, a ZLS maintainer can take care of this. // Whenever the dependencies are updated, run the following command: // ```bash diff --git a/flake.lock b/flake.lock index 3166bdcfb..e1041e2fe 100644 --- a/flake.lock +++ b/flake.lock @@ -16,31 +16,13 @@ "type": "github" } }, - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1705309234, - "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "nixpkgs": { "locked": { - "lastModified": 1770464364, - "narHash": "sha256-z5NJPSBwsLf/OfD8WTmh79tlSU8XgIbwmk6qB1/TFzY=", + "lastModified": 1772047000, + "narHash": "sha256-7DaQVv4R97cii/Qdfy4tmDZMB2xxtyIvNGSwXBBhSmo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "23d72dabcb3b12469f57b37170fcbc1789bd7457", + "rev": "1267bb4920d0fc06ea916734c11b0bf004bbe17e", "type": "github" }, "original": { @@ -57,6 +39,7 @@ } }, "systems": { + "flake": false, "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -74,17 +57,17 @@ "zig-overlay": { "inputs": { "flake-compat": "flake-compat", - "flake-utils": "flake-utils", "nixpkgs": [ "nixpkgs" - ] + ], + "systems": "systems" }, "locked": { - "lastModified": 1770598090, - "narHash": "sha256-k+82IDgTd9o5sxHIqGlvfwseKln3Ejx1edGtDltuPXo=", + "lastModified": 1772280928, + "narHash": "sha256-3Anj6gxEr94r2BTPa0+73PADJCRUmRdntIUhyfY7Zzo=", "owner": "mitchellh", "repo": "zig-overlay", - "rev": "142495696982c88edddc8e17e4da90d8164acadf", + "rev": "e0f2810732c4205e929dc00c63ced0145240ddb8", "type": "github" }, "original": { diff --git a/src/build_runner/build_runner.zig b/src/build_runner/build_runner.zig index 38874a402..3e0183442 100644 --- a/src/build_runner/build_runner.zig +++ b/src/build_runner/build_runner.zig @@ -58,13 +58,9 @@ pub fn main(init: process.Init.Minimal) !void { const io = threaded.ioBasic(); // ...but we'll back our arena by `std.heap.page_allocator` for efficiency. - var single_threaded_arena: std.heap.ArenaAllocator = .init(std.heap.page_allocator); - defer single_threaded_arena.deinit(); - var thread_safe_arena: std.heap.ThreadSafeAllocator = .{ - .child_allocator = single_threaded_arena.allocator(), - .io = io, - }; - const arena = thread_safe_arena.allocator(); + var arena_instance: std.heap.ArenaAllocator = .init(std.heap.page_allocator); + defer arena_instance.deinit(); + const arena = arena_instance.allocator(); const args = try init.args.toSlice(arena); @@ -106,7 +102,7 @@ pub fn main(init: process.Init.Minimal) !void { .io = io, .gpa = gpa, .manifest_dir = try local_cache_directory.handle.createDirPathOpen(io, "h", .{}), - .cwd = try process.currentPathAlloc(io, single_threaded_arena.allocator()), + .cwd = try process.currentPathAlloc(io, arena), }, .zig_exe = zig_exe, .environ_map = try init.environ.createMap(arena), @@ -259,8 +255,10 @@ pub fn main(init: process.Init.Minimal) !void { fatal("argument '{s}' is not available", .{arg}); } else if (mem.eql(u8, arg, "--debug-pkg-config")) { builder.debug_pkg_config = true; - } else if (mem.eql(u8, arg, "--debug-rt")) { - graph.debug_compiler_runtime_libs = true; + } else if (mem.cutPrefix(u8, arg, "--debug-rt=")) |rest| { + graph.debug_compiler_runtime_libs = + std.meta.stringToEnum(std.builtin.OptimizeMode, rest) orelse + fatal("unrecognized optimization mode: '{s}'", .{rest}); } else if (mem.eql(u8, arg, "--debug-compile-errors")) { builder.debug_compile_errors = true; } else if (mem.eql(u8, arg, "--debug-incremental")) {