Skip to content

Commit

Permalink
Pass --zig-lib-dir config option to the build runner (#2145)
Browse files Browse the repository at this point in the history
  • Loading branch information
GalaxyShard authored Jan 14, 2025
1 parent 3b8364a commit f7888fc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/DocumentStore.zig
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,7 @@ pub fn invalidateBuildFile(self: *DocumentStore, build_file_uri: Uri) void {
if (self.config.zig_exe_path == null) return;
if (self.config.build_runner_path == null) return;
if (self.config.global_cache_path == null) return;
if (self.config.zig_lib_path == null) return;

if (builtin.single_threaded) {
self.invalidateBuildFileWorker(build_file_uri, false);
Expand Down Expand Up @@ -1005,7 +1006,7 @@ fn prepareBuildRunnerArgs(self: *DocumentStore, build_file_uri: []const u8) ![][
defer tracy_zone.end();

const base_args = &[_][]const u8{
self.config.zig_exe_path.?, "build", "--build-runner", self.config.build_runner_path.?,
self.config.zig_exe_path.?, "build", "--build-runner", self.config.build_runner_path.?, "--zig-lib-dir", self.config.zig_lib_path.?,
};

var args: std.ArrayListUnmanaged([]const u8) = try .initCapacity(self.allocator, base_args.len);
Expand Down Expand Up @@ -1039,6 +1040,7 @@ fn loadBuildConfiguration(self: *DocumentStore, build_file_uri: Uri) !std.json.P
std.debug.assert(self.config.zig_exe_path != null);
std.debug.assert(self.config.build_runner_path != null);
std.debug.assert(self.config.global_cache_path != null);
std.debug.assert(self.config.zig_lib_path != null);

const build_file_path = try URI.parse(self.allocator, build_file_uri);
defer self.allocator.free(build_file_path);
Expand Down

0 comments on commit f7888fc

Please sign in to comment.