From 555aef57581d967a25d193aec965cca296620520 Mon Sep 17 00:00:00 2001 From: Baitinq Date: Fri, 24 Jan 2025 00:58:49 +0100 Subject: Misc: better lsp --- build.zig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'build.zig') diff --git a/build.zig b/build.zig index f4db0c9..328429e 100644 --- a/build.zig +++ b/build.zig @@ -26,6 +26,9 @@ pub fn build(b: *std.Build) !void { .optimize = optimize, }); + const llvm_zig = b.dependency("llvm-zig", .{}); + exe_mod.addImport("llvm", llvm_zig.module("llvm")); + // This creates another `std.Build.Step.Compile`, but this one builds an executable // rather than a static library. const exe = b.addExecutable(.{ @@ -33,9 +36,6 @@ pub fn build(b: *std.Build) !void { .root_module = exe_mod, }); - const llvm_zig = b.dependency("llvm-zig", .{}); - exe.root_module.addImport("llvm", llvm_zig.module("llvm")); - // This declares intent for the executable to be installed into the // standard location when the user invokes the "install" step (the default // step when running `zig build`). @@ -45,7 +45,7 @@ pub fn build(b: *std.Build) !void { const exe_check = b.addExecutable(.{ .name = "interpreter-lsp", .root_source_file = b.path("src/main.zig"), - .target = target, + .root_module = exe_mod, .optimize = optimize, }); -- cgit 1.4.1