Changes
2 changed files (+5/-22)
-
-
@@ -43,15 +43,6 @@ };// Executable { const memcheck = b.option( bool, "memcheck", "Enable memory checking. This option also enables support for Valgrind's memcheck.", ) orelse false; const options = b.addOptions(); options.addOption(bool, "memcheck", memcheck); const exe = b.addExecutable(.{ .name = "plac", .root_module = b.createModule(.{
-
@@ -63,7 +54,6 @@ });exe.root_module.addImport("core", core); exe.root_module.addImport("clap", clap); exe.root_module.addOptions("build_config", options); exe.linkLibC(); b.installArtifact(exe);
-
-
-
@@ -16,7 +16,6 @@ // SPDX-License-Identifier: Apache-2.0const std = @import("std"); const clap = @import("clap"); const build_config = @import("build_config"); const core = @import("core"); const ExitCode = @import("./exit.zig").ExitCode;
-
@@ -66,20 +65,14 @@ \\); pub fn main() !u8 { const allocator: std.mem.Allocator, const mem = if (build_config.memcheck) memcheck: { var da = std.heap.DebugAllocator(.{ .safety = true }){ .backing_allocator = std.heap.c_allocator, }; break :memcheck .{ da.allocator(), &da }; } else arena: { var arena = std.heap.ArenaAllocator.init(std.heap.page_allocator); break :arena .{ arena.allocator(), &arena }; var debug_allocator = std.heap.DebugAllocator(.{ .safety = true }){ .backing_allocator = std.heap.c_allocator, }; const allocator = debug_allocator.allocator(); defer { _ = mem.deinit(); _ = debug_allocator.deinit(); } var iter = try std.process.ArgIterator.initWithAllocator(allocator);
-