about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--build.zig8
1 files changed, 4 insertions, 4 deletions
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,
     });