Skip to content

Commit c8b7e1d

Browse files
committed
---
yaml --- r: 71763 b: refs/heads/dist-snap c: fac0d9d h: refs/heads/master i: 71761: de24858 71759: 744ecf9 v: v3
1 parent d8908bb commit c8b7e1d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
99
refs/heads/incoming: b50030718cf28f2a5a81857a26b57442734fe854
10-
refs/heads/dist-snap: f06404860ce4c083461483b41879ae40f08a3fc2
10+
refs/heads/dist-snap: fac0d9d89bd55eccda2549d59b5355afdcaa783f
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/src/librustc/middle/trans/base.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2243,17 +2243,17 @@ pub fn create_main_wrapper(ccx: @CrateContext,
22432243
}
22442244
22452245
fn create_entry_fn(ccx: @CrateContext, rust_main: ValueRef) {
2246-
#[cfg(windows)]
2247-
fn main_name() -> ~str { return ~"WinMain@16"; }
2248-
#[cfg(unix)]
2249-
fn main_name() -> ~str { return ~"main"; }
22502246
let llfty = T_fn(~[ccx.int_type, T_ptr(T_ptr(T_i8()))], ccx.int_type);
22512247
22522248
// FIXME #4404 android JNI hacks
22532249
let llfn = if *ccx.sess.building_library {
22542250
decl_cdecl_fn(ccx.llmod, ~"amain", llfty)
22552251
} else {
2256-
decl_cdecl_fn(ccx.llmod, main_name(), llfty)
2252+
let main_name = match ccx.sess.targ_cfg.os {
2253+
session::os_win32 => ~"WinMain@16",
2254+
_ => ~"main",
2255+
};
2256+
decl_cdecl_fn(ccx.llmod, main_name, llfty)
22572257
};
22582258
let llbb = str::as_c_str(~"top", |buf| {
22592259
unsafe {

0 commit comments

Comments
 (0)