Skip to content

Commit c09d0cb

Browse files
bfredlnatecraddock
authored andcommitted
fix(build): use cross-platform init.args.iterateAllocator()
When running on windows an allocator is required: +- run exe minilua (buildvm_arch.h) +- run cmd +- run exe patch (dynasm-patched.lua) +- compile exe patch Debug native 1 errors ...\zig-x86_64-windows-0.16.0\lib\std\process\Args.zig:39:36: error: In Windows, use initAllocator instead. if (native_os == .windows) @CompileError("In Windows, use initAllocator instead."); As this one-shot script uses an arena, there is no deinit() call
1 parent 63e3aab commit c09d0cb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

build/patch.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pub fn main(init: std.process.Init.Minimal) !void {
1010
defer threaded.deinit();
1111
const io = threaded.io();
1212

13-
var iter = init.args.iterate();
13+
var iter = try init.args.iterateAllocator(allocator);
1414

1515
// Skip executable name
1616
_ = iter.next();

0 commit comments

Comments
 (0)