| ... | @@ -24,10 +24,10 @@ comptime { | ... | @@ -24,10 +24,10 @@ comptime { |
| 24 | @export("_DllMainCRTStartup", _DllMainCRTStartup, .Strong); | 24 | @export("_DllMainCRTStartup", _DllMainCRTStartup, .Strong); |
| 25 | } | 25 | } |
| 26 | } else if (builtin.output_mode == .Exe or @hasDecl(root, "main")) { | 26 | } else if (builtin.output_mode == .Exe or @hasDecl(root, "main")) { |
| 27 | if (builtin.link_libc and @hasDecl(root, "main") and | 27 | if (builtin.link_libc and @hasDecl(root, "main")) { |
| 28 | @typeInfo(@typeOf(root.main)).Fn.calling_convention != .C) | 28 | if (@typeInfo(@typeOf(root.main)).Fn.calling_convention != .C) { |
| 29 | { | 29 | @export("main", main, .Weak); |
| 30 | @export("main", main, .Weak); | 30 | } |
| 31 | } else if (builtin.os == .windows) { | 31 | } else if (builtin.os == .windows) { |
| 32 | if (!@hasDecl(root, "WinMain") and !@hasDecl(root, "WinMainCRTStartup")) { | 32 | if (!@hasDecl(root, "WinMain") and !@hasDecl(root, "WinMainCRTStartup")) { |
| 33 | @export("WinMainCRTStartup", WinMainCRTStartup, .Strong); | 33 | @export("WinMainCRTStartup", WinMainCRTStartup, .Strong); |