aboutsummaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
authorLee Cannon <leecannon@leecannon.xyz>2022-01-23 20:10:39 +0000
committerAndrew Kelley <andrew@ziglang.org>2022-01-25 18:21:58 -0500
commitfbe5336f3be7065ab84b797eb629ada9565341c2 (patch)
treefb67cb075a9b57c972511f13a979e43881a48eb2 /build.zig
parent53c668d3a9dad430749cbc642d7bf8cf45eefba1 (diff)
downloadzig-fbe5336f3be7065ab84b797eb629ada9565341c2.tar.gz
zig-fbe5336f3be7065ab84b797eb629ada9565341c2.zip
add option to force usage of `GeneralPurposeAllocator`
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig2
1 files changed, 2 insertions, 0 deletions
diff --git a/build.zig b/build.zig
index 6f751404a6..f1676bdf23 100644
--- a/build.zig
+++ b/build.zig
@@ -112,6 +112,7 @@ pub fn build(b: *Builder) !void {
const tracy = b.option([]const u8, "tracy", "Enable Tracy integration. Supply path to Tracy source");
const tracy_callstack = b.option(bool, "tracy-callstack", "Include callstack information with Tracy data. Does nothing if -Dtracy is not provided") orelse false;
const tracy_allocation = b.option(bool, "tracy-allocation", "Include allocation information with Tracy data. Does nothing if -Dtracy is not provided") orelse false;
+ const force_gpa = b.option(bool, "force-gpa", "Force the compiler to use GeneralPurposeAllocator") orelse false;
const link_libc = b.option(bool, "force-link-libc", "Force self-hosted compiler to link libc") orelse enable_llvm;
const strip = b.option(bool, "strip", "Omit debug information") orelse false;
@@ -150,6 +151,7 @@ pub fn build(b: *Builder) !void {
exe_options.addOption(bool, "llvm_has_csky", llvm_has_csky);
exe_options.addOption(bool, "llvm_has_ve", llvm_has_ve);
exe_options.addOption(bool, "llvm_has_arc", llvm_has_arc);
+ exe_options.addOption(bool, "force_gpa", force_gpa);
if (enable_llvm) {
const cmake_cfg = if (static_llvm) null else findAndParseConfigH(b, config_h_path_option);