Skip to content

Commit

Permalink
build.zig: use the options for setting the use_llvm flags
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewrk committed May 9, 2024
1 parent 1eec5be commit 689ae93
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,16 @@ const std = @import("std");
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});

const use_llvm = b.option(bool, "use-llvm", "use the LLVM backend");

const exe = b.addExecutable(.{
.name = "tetris",
.root_source_file = b.path("src/main.zig"),
.optimize = optimize,
.target = target,
.use_llvm = use_llvm,
.use_lld = use_llvm,
});
exe.use_llvm = use_llvm;
exe.use_lld = use_llvm;

exe.linkLibC();
exe.linkSystemLibrary("glfw");
Expand Down

0 comments on commit 689ae93

Please sign in to comment.