mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-27 19:09:47 +03:00
fix(std): don't add the default _start and panic in homebrew targets
* even if std supported those targets, they're not posixy to be in that codepath.
This commit is contained in:
committed by
Alex Rønne Petersen
parent
6bf5b7f2b4
commit
1bca158c6e
+3
-2
@@ -91,8 +91,9 @@ comptime {
|
||||
// Only call main when defined. For WebAssembly it's allowed to pass `-fno-entry` in which
|
||||
// case it's not required to provide an entrypoint such as main.
|
||||
if (!@hasDecl(root, start_sym_name) and @hasDecl(root, "main")) @export(&wasm_freestanding_start, .{ .name = start_sym_name });
|
||||
} else if (native_os != .other and native_os != .freestanding) {
|
||||
if (!@hasDecl(root, start_sym_name)) @export(&_start, .{ .name = start_sym_name });
|
||||
} else switch (native_os) {
|
||||
.other, .freestanding, .@"3ds", .vita => {},
|
||||
else => if (!@hasDecl(root, start_sym_name)) @export(&_start, .{ .name = start_sym_name }),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user