build: add -Dno-llvm build option
This commit is contained in:
parent
033cad47bf
commit
045ee7bd25
@ -18,6 +18,7 @@ pub fn build(b: *Build) !void {
|
|||||||
|
|
||||||
const strip = b.option(bool, "strip", "Omit debug information") orelse false;
|
const strip = b.option(bool, "strip", "Omit debug information") orelse false;
|
||||||
const pie = b.option(bool, "pie", "Build a Position Independent Executable") orelse false;
|
const pie = b.option(bool, "pie", "Build a Position Independent Executable") orelse false;
|
||||||
|
const llvm = !(b.option(bool, "no-llvm", "(expirimental) Use non-LLVM x86 Zig backend") orelse false);
|
||||||
|
|
||||||
const omit_frame_pointer = switch (optimize) {
|
const omit_frame_pointer = switch (optimize) {
|
||||||
.Debug, .ReleaseSafe => false,
|
.Debug, .ReleaseSafe => false,
|
||||||
@ -169,6 +170,8 @@ pub fn build(b: *Build) !void {
|
|||||||
.target = target,
|
.target = target,
|
||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
.strip = strip,
|
.strip = strip,
|
||||||
|
.use_llvm = llvm,
|
||||||
|
.use_lld = llvm,
|
||||||
});
|
});
|
||||||
river.root_module.addOptions("build_options", options);
|
river.root_module.addOptions("build_options", options);
|
||||||
|
|
||||||
@ -206,6 +209,8 @@ pub fn build(b: *Build) !void {
|
|||||||
.target = target,
|
.target = target,
|
||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
.strip = strip,
|
.strip = strip,
|
||||||
|
.use_llvm = llvm,
|
||||||
|
.use_lld = llvm,
|
||||||
});
|
});
|
||||||
riverctl.root_module.addOptions("build_options", options);
|
riverctl.root_module.addOptions("build_options", options);
|
||||||
|
|
||||||
@ -229,6 +234,8 @@ pub fn build(b: *Build) !void {
|
|||||||
.target = target,
|
.target = target,
|
||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
.strip = strip,
|
.strip = strip,
|
||||||
|
.use_llvm = llvm,
|
||||||
|
.use_lld = llvm,
|
||||||
});
|
});
|
||||||
rivertile.root_module.addOptions("build_options", options);
|
rivertile.root_module.addOptions("build_options", options);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user