Skip to content

Commit

Permalink
Add build toggle for forcing LLVM or self-hosted backend
Browse files Browse the repository at this point in the history
Default is the same default as Zig, so LLVM by default.
  • Loading branch information
Beyley committed Nov 26, 2023
1 parent 74546a5 commit 2900ecb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ pub fn build(b: *std.Build) !void {
.target = target,
.optimize = optimize,
});
if (b.option(bool, "use_llvm", "Use the LLVM backend")) |use_llvm| {
exe.use_lld = use_llvm;
exe.use_llvm = use_llvm;
}
exe.addModule("api", refresh_api_zig.module("refresh-api-zig"));
//If we are on MacOS, we need to import the xcode frameworks
if (target.getOsTag() == .macos) {
Expand Down

0 comments on commit 2900ecb

Please sign in to comment.