aboutsummaryrefslogtreecommitdiff
path: root/src/linker.cpp
diff options
context:
space:
mode:
authorJon Lipstate <jon@lipstate.com>2025-08-29 12:41:38 -0700
committerJon Lipstate <jon@lipstate.com>2025-08-29 12:41:38 -0700
commit231ce2da59cd93b4e8d8a90daca2d2111fc3ecf8 (patch)
tree53a7fd84f67213318f659f02b4d03d6f7acdac45 /src/linker.cpp
parentf926c1861f5346d23b1b60f6b5970f598d3584b3 (diff)
windows i386 support
Diffstat (limited to 'src/linker.cpp')
-rw-r--r--src/linker.cpp6
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 != "") {