windows i386 support

This commit is contained in:
Jon Lipstate
2025-08-29 12:41:38 -07:00
parent f926c1861f
commit 231ce2da59
6 changed files with 50 additions and 8 deletions

View File

@@ -281,7 +281,11 @@ try_cross_linking:;
link_settings = gb_string_append_fmt(link_settings, " /NOENTRY");
}
} else {
link_settings = gb_string_append_fmt(link_settings, " /ENTRY:mainCRTStartup");
// For i386 with CRT, libcmt provides the entry point
// For other cases or no_crt, we need to specify the entry point
if (!(build_context.metrics.arch == TargetArch_i386 && !build_context.no_crt)) {
link_settings = gb_string_append_fmt(link_settings, " /ENTRY:mainCRTStartup");
}
}
if (build_context.build_paths[BuildPath_Symbols].name != "") {