aboutsummaryrefslogtreecommitdiff
path: root/src
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 /src
parent53c668d3a9dad430749cbc642d7bf8cf45eefba1 (diff)
downloadzig-fbe5336f3be7065ab84b797eb629ada9565341c2.tar.gz
zig-fbe5336f3be7065ab84b797eb629ada9565341c2.zip
add option to force usage of `GeneralPurposeAllocator`
Diffstat (limited to 'src')
-rw-r--r--src/main.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.zig b/src/main.zig
index 3bf0f85391..64a478c813 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -137,7 +137,7 @@ pub fn main() anyerror!void {
var gpa_need_deinit = false;
const gpa = gpa: {
- if (!builtin.link_libc) {
+ if (build_options.force_gpa or !builtin.link_libc) {
gpa_need_deinit = true;
break :gpa general_purpose_allocator.allocator();
}