diff options
author | Himbeer <himbeer@disroot.org> | 2024-07-31 16:43:21 +0200 |
---|---|---|
committer | Himbeer <himbeer@disroot.org> | 2024-07-31 16:43:21 +0200 |
commit | 21b2aa53ab7e1d5c730c81dffe52887d09066a45 (patch) | |
tree | 480bda61bff9bd9d023371bf7562deeadea5bcf2 | |
parent | cd57252f51d696639a361c903b643b6a09d554d2 (diff) |
root: Always export _start
-rw-r--r-- | src/root.zig | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/root.zig b/src/root.zig index 6f6c9cb..a312b2a 100644 --- a/src/root.zig +++ b/src/root.zig @@ -16,16 +16,12 @@ const Result = struct { const SyscallError = error{Kernel}; -fn _start() callconv(.C) noreturn { +export fn _start() noreturn { if (!@hasDecl(root, "main")) @compileError("no main function"); root.main(); end(); } -comptime { - if (!builtin.is_test) @export(_start, .{ .name = "_start" }); -} - fn autoCast(value: anytype) usize { return switch (@typeInfo(@TypeOf(value))) { .Type => @compileError("cannot pass type to system call"), |