File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 981edaef40ef30b2151c28e55a4fba5613c1cb25
2
+ refs/heads/master: c1fb592f620bf29d854d64816974c478d567e578
Original file line number Diff line number Diff line change @@ -1197,8 +1197,15 @@ fn trans_main_fn(@trans_ctxt cx, ValueRef llcrate) {
1197
1197
auto T_main_args = vec ( T_int ( ) , T_int ( ) ) ;
1198
1198
auto T_rust_start_args = vec ( T_int ( ) , T_int ( ) , T_int ( ) , T_int ( ) ) ;
1199
1199
1200
+ auto main_name;
1201
+ if ( _str. eq ( std. os . target_os ( ) , "win32" ) ) {
1202
+ main_name = "WinMain@16" ;
1203
+ } else {
1204
+ main_name = "main" ;
1205
+ }
1206
+
1200
1207
auto llmain =
1201
- decl_cdecl_fn ( cx. llmod , "main" , T_main_args , T_int ( ) ) ;
1208
+ decl_cdecl_fn ( cx. llmod , main_name , T_main_args , T_int ( ) ) ;
1202
1209
1203
1210
auto llrust_start =
1204
1211
decl_cdecl_fn ( cx. llmod , "rust_start" , T_rust_start_args , T_int ( ) ) ;
You can’t perform that action at this time.
0 commit comments