Skip to content

Commit

Permalink
image processor does not need libc
Browse files Browse the repository at this point in the history
  • Loading branch information
Beyley committed Nov 5, 2023
1 parent 8b3f030 commit 430a60b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
7 changes: 0 additions & 7 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,6 @@ pub fn build(b: *std.Build) !void {
.root_source_file = .{ .path = root_path ++ "image_processor.zig" },
});

if (target.isDarwin()) {
process_assets_exe.addIncludePath(.{ .path = root_path ++ "libs/system-sdk/macos12/usr/include" });
process_assets_exe.addFrameworkPath(.{ .path = root_path ++ "libs/system-sdk/macos12/System/Library/Frameworks" });
process_assets_exe.addLibraryPath(.{ .path = root_path ++ "libs/system-sdk/macos12/usr/lib" });
}

process_assets_exe.linkLibC();
process_assets_exe.addModule("zigimg", zigimg_module);
var run_process_assets = b.addRunArtifact(process_assets_exe);
run_process_assets.addArg(root_path);
Expand Down
3 changes: 2 additions & 1 deletion image_processor.zig
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ const Image = struct {
};

pub fn main() !void {
const allocator = std.heap.c_allocator;
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
const allocator = gpa.allocator();

var args = try std.process.argsAlloc(allocator);
defer std.process.argsFree(allocator, args);
Expand Down

0 comments on commit 430a60b

Please sign in to comment.