zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 7b9f8782c868b8331181bd47361e4dee2d8aebfe (tree)
parent 8311fac7e853f7e8454e79794ab9060a488a7875
Author: Jacob Young <jacobly0@users.noreply.github.com>
Date:   Sun,  5 Nov 2023 09:28:40 -0500

build: add option to specify whether to use the llvm backend

Diffstat:
Mbuild.zig | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/build.zig b/build.zig @@ -224,6 +224,10 @@ pub fn build(b: *std.Build) !void { check_case_exe.want_lto = false; } + const use_llvm = b.option(bool, "use-llvm", "Use the llvm backend"); + exe.use_llvm = use_llvm; + exe.use_lld = use_llvm; + const exe_options = b.addOptions(); exe.addOptions("build_options", exe_options);