diff options
| author | LemonBoy <thatlemon@gmail.com> | 2020-01-18 18:11:20 +0100 |
|---|---|---|
| committer | LemonBoy <thatlemon@gmail.com> | 2020-01-19 00:11:45 +0100 |
| commit | fa52c9e36efde38f6d1c6e280636ba7f6cb6f83a (patch) | |
| tree | 4edf00f17b9c7ec23e0b5619e70e372f6fb0bc1e /lib/std/start.zig | |
| parent | b72f858194a3f6391de06d83ffa49596cfce21a4 (diff) | |
| download | zig-fa52c9e36efde38f6d1c6e280636ba7f6cb6f83a.tar.gz zig-fa52c9e36efde38f6d1c6e280636ba7f6cb6f83a.zip | |
Small cleanups
Diffstat (limited to 'lib/std/start.zig')
| -rw-r--r-- | lib/std/start.zig | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/lib/std/start.zig b/lib/std/start.zig index c3844e4d1e..bf6f61f25f 100644 --- a/lib/std/start.zig +++ b/lib/std/start.zig @@ -8,16 +8,7 @@ const uefi = std.os.uefi; var starting_stack_ptr: [*]usize = undefined; -const is_wasm = switch (builtin.arch) { - .wasm32, .wasm64 => true, - else => false, -}; - -const is_mips = switch (builtin.arch) { - .mips, .mipsel, .mips64, .mips64el => true, - else => false, -}; -const start_sym_name = if (is_mips) "__start" else "_start"; +const start_sym_name = if (builtin.arch.isMIPS()) "__start" else "_start"; comptime { if (builtin.output_mode == .Lib and builtin.link_mode == .Dynamic) { @@ -35,7 +26,7 @@ comptime { } } else if (builtin.os == .uefi) { if (!@hasDecl(root, "EfiMain")) @export(EfiMain, .{ .name = "EfiMain" }); - } else if (is_wasm and builtin.os == .freestanding) { + } else if (builtin.arch.isWasm() and builtin.os == .freestanding) { if (!@hasDecl(root, start_sym_name)) @export(wasm_freestanding_start, .{ .name = start_sym_name }); } else if (builtin.os != .other and builtin.os != .freestanding) { if (!@hasDecl(root, start_sym_name)) @export(_start, .{ .name = start_sym_name }); |
