Skip to content

Commit

Permalink
build: add TODO about relative zig-lib-dir and global-cache-path
Browse files Browse the repository at this point in the history
  • Loading branch information
Techatrix committed Dec 18, 2024
1 parent 8176fe7 commit 9dabcc0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,10 @@ pub fn build(b: *Build) !void {
const test_options = b.addOptions();
test_options.step.name = "ZLS test options";
const test_options_module = test_options.createModule();
test_options.addOption([]const u8, "zig_exe_path", b.graph.zig_exe);
test_options.addOption([]const u8, "zig_lib_path", b.graph.zig_lib_directory.path.?);
test_options.addOption([]const u8, "global_cache_path", b.graph.global_cache_root.join(b.allocator, &.{"zls"}) catch @panic("OOM"));
test_options.addOptionPath("zig_exe_path", .{ .cwd_relative = b.graph.zig_exe });
// TODO these paths may be relative
test_options.addOptionPath("zig_lib_path", .{ .cwd_relative = b.fmt("{}", .{b.graph.zig_lib_directory}) });
test_options.addOptionPath("global_cache_path", .{ .cwd_relative = b.cache_root.join(b.allocator, &.{"zls"}) catch @panic("OOM") });

const known_folders_module = b.dependency("known_folders", .{}).module("known-folders");
const diffz_module = b.dependency("diffz", .{}).module("diffz");
Expand Down

0 comments on commit 9dabcc0

Please sign in to comment.