| ... | @@ -40,7 +40,7 @@ comptime { | ... | @@ -40,7 +40,7 @@ comptime { |
| 40 | } else if (builtin.output_mode == .Exe or @hasDecl(root, "main")) { | 40 | } else if (builtin.output_mode == .Exe or @hasDecl(root, "main")) { |
| 41 | if (builtin.link_libc and @hasDecl(root, "main")) { | 41 | if (builtin.link_libc and @hasDecl(root, "main")) { |
| 42 | if (@typeInfo(@TypeOf(root.main)).Fn.calling_convention != .C) { | 42 | if (@typeInfo(@TypeOf(root.main)).Fn.calling_convention != .C) { |
| 43 | @export(main, .{ .name = "main", .linkage = .Weak }); | 43 | @export(main, .{ .name = "main" }); |
| 44 | } | 44 | } |
| 45 | } else if (builtin.os.tag == .windows) { | 45 | } else if (builtin.os.tag == .windows) { |
| 46 | if (!@hasDecl(root, "WinMain") and !@hasDecl(root, "WinMainCRTStartup") and | 46 | if (!@hasDecl(root, "WinMain") and !@hasDecl(root, "WinMainCRTStartup") and |