diff options
| author | Baitinq <[email protected]> | 2025-01-24 00:58:49 +0100 |
|---|---|---|
| committer | Baitinq <[email protected]> | 2025-01-24 00:58:49 +0100 |
| commit | 555aef57581d967a25d193aec965cca296620520 (patch) | |
| tree | 21cad06d5544038d2f43bbb58a1ff49b4a712287 | |
| parent | Misc: get llvm compilation kind of working (diff) | |
| download | interpreter-555aef57581d967a25d193aec965cca296620520.tar.gz interpreter-555aef57581d967a25d193aec965cca296620520.tar.bz2 interpreter-555aef57581d967a25d193aec965cca296620520.zip | |
Misc: better lsp
| -rw-r--r-- | build.zig | 8 |
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, }); |