Skip to content

Commit

Permalink
Fix SUBSYSTEM for link.exe
Browse files Browse the repository at this point in the history
  • Loading branch information
gingerBill committed Jan 5, 2017
1 parent d025791 commit 1356dfe
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ir.c
Original file line number Diff line number Diff line change
Expand Up @@ -5343,7 +5343,7 @@ void ir_gen_tree(irGen *s) {
ir_end_procedure_body(proc);
}
#endif
#if defined(GB_SYSTEM_WINDOWS)
#if 0 && defined(GB_SYSTEM_WINDOWS)
if (!m->build_context->is_dll && !has_win_main) {
// WinMain :: proc(inst, prev: rawptr, cmd_line: ^byte, cmd_show: i32) -> i32
String name = str_lit("WinMain");
Expand Down
1 change: 1 addition & 0 deletions src/ir_print.c
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,7 @@ bool ir_print_is_proc_global(irModule *m, irProcedure *proc) {
if (proc->entity != NULL &&
proc->entity->kind == Entity_Procedure) {
if (m->entry_point_entity == proc->entity) {
// gb_printf("%.*s\n", LIT(proc->entity->token.string));
// TODO(bill): This may not be needed during windows
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ int main(int argc, char **argv) {
exit_code = win32_exec_command_line_app("msvc-link", true,
"link %.*s.obj -OUT:%.*s.%s %s "
"/defaultlib:libcmt "
"/nologo /incremental:no /opt:ref /subsystem:WINDOWS "
"/nologo /incremental:no /opt:ref /subsystem:CONSOLE "
" %.*s "
" %s "
"",
Expand Down

0 comments on commit 1356dfe

Please sign in to comment.