diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2025-09-18 22:01:14 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-18 22:01:14 +0100 |
| commit | 4d2854f5618c8e6a09bc2ec7bf969eccb01f93c2 (patch) | |
| tree | ece1e00dd4e8f7bbb1098f4cffbed5b232e7f6e2 /src/linker.cpp | |
| parent | 9cf69576ab8cb220af5802a04a0aa53dc92046a5 (diff) | |
| parent | 57bc45ae30736a891e4b65c7047a091e53cf60e3 (diff) | |
Merge pull request #5632 from kalsprite/x386
windows i386 support
Diffstat (limited to 'src/linker.cpp')
| -rw-r--r-- | src/linker.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/linker.cpp b/src/linker.cpp index 41333a3c9..333cb792e 100644 --- a/src/linker.cpp +++ b/src/linker.cpp @@ -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 != "") { |