aboutsummaryrefslogtreecommitdiff
path: root/src/linker.cpp
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2025-09-18 23:26:23 +0100
committergingerBill <gingerBill@users.noreply.github.com>2025-09-18 23:26:23 +0100
commit1507cc01a5b32842febe1cd2e75451adab6d4dc7 (patch)
tree37b9ce260845f46c556d3f22e1b105c750b7ef5d /src/linker.cpp
parent5d14df4112368617b9b534745f8ce8934be74ffd (diff)
parent4d2854f5618c8e6a09bc2ec7bf969eccb01f93c2 (diff)
Merge branch 'master' of https://github.com/odin-lang/Odin
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 != "") {