initialize std.os.argv in stage1 compiler. it is needed for selfExePath under OpenBSD

This commit is contained in:
Sébastien Marie 2020-10-11 12:25:16 +00:00
parent a6dc2b7fcc
commit 161eb4a000

View File

@ -25,7 +25,9 @@ comptime {
pub const log = stage2.log;
pub const log_level = stage2.log_level;
pub export fn main(argc: c_int, argv: [*]const [*:0]const u8) c_int {
pub export fn main(argc: c_int, argv: [*][*:0]u8) c_int {
std.os.argv = argv[0.. @intCast(usize, argc)];
std.debug.maybeEnableSegfaultHandler();
zig_stage1_os_init();