aboutsummaryrefslogtreecommitdiff
path: root/lib/std/start.zig
diff options
context:
space:
mode:
authorGasInfinity <me@gasinfinity.dev>2025-10-18 19:23:19 +0200
committerAlex Rønne Petersen <alex@alexrp.com>2025-10-18 23:54:27 +0200
commit1bca158c6e0a4f301cef18db705d89de78c86bcb (patch)
tree9db6581ebcfcd221b150283609a7f5d3208d83af /lib/std/start.zig
parent6bf5b7f2b40be1a92c66fed05e53815b3ab07733 (diff)
downloadzig-1bca158c6e0a4f301cef18db705d89de78c86bcb.tar.gz
zig-1bca158c6e0a4f301cef18db705d89de78c86bcb.zip
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.
Diffstat (limited to 'lib/std/start.zig')
-rw-r--r--lib/std/start.zig5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/std/start.zig b/lib/std/start.zig
index 299823a127..318d819d2e 100644
--- a/lib/std/start.zig
+++ b/lib/std/start.zig
@@ -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 }),
}
}
}