Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down
2 changes: 1 addition & 1 deletion build.zig.zon
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
35 changes: 9 additions & 26 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 8 additions & 10 deletions src/build_runner/build_runner.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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")) {
Expand Down