Skip to content

Commit e41a81b

Browse files
committed
Set main_name "WinMain" on Win64
1 parent a35bfa2 commit e41a81b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/librustc/middle/trans/base.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2370,7 +2370,12 @@ pub fn create_entry_wrapper(ccx: @mut CrateContext,
23702370
decl_cdecl_fn(ccx.llmod, "amain", llfty)
23712371
} else {
23722372
let main_name = match ccx.sess.targ_cfg.os {
2373-
session::os_win32 => ~"WinMain@16",
2373+
session::os_win32 => {
2374+
match ccx.sess.targ_cfg.arch {
2375+
X86 => ~"WinMain@16",
2376+
_ => ~"WinMain",
2377+
}
2378+
},
23742379
_ => ~"main",
23752380
};
23762381
decl_cdecl_fn(ccx.llmod, main_name, llfty)

0 commit comments

Comments
 (0)