aboutsummaryrefslogtreecommitdiff
path: root/src/linker.cpp
diff options
context:
space:
mode:
authorFeoramund <161657516+Feoramund@users.noreply.github.com>2025-06-10 08:54:28 -0400
committerFeoramund <161657516+Feoramund@users.noreply.github.com>2025-06-10 08:54:28 -0400
commit1fc390146f247b3770af887ce2592573d5803fe5 (patch)
treef3f704c0022edeb7889c753fd0ae7fd767d59dc0 /src/linker.cpp
parent611390ba2765db7f3b44c2fa404c46e179bdecf4 (diff)
Let `-no-entry-point` work for Windows DLLs
Fixes #4660
Diffstat (limited to 'src/linker.cpp')
-rw-r--r--src/linker.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/linker.cpp b/src/linker.cpp
index 2210c1306..acb4dc86c 100644
--- a/src/linker.cpp
+++ b/src/linker.cpp
@@ -277,6 +277,9 @@ try_cross_linking:;
if (build_context.build_mode == BuildMode_DynamicLibrary) {
link_settings = gb_string_append_fmt(link_settings, " /DLL");
+ if (build_context.no_entry_point) {
+ link_settings = gb_string_append_fmt(link_settings, " /NOENTRY");
+ }
} else {
link_settings = gb_string_append_fmt(link_settings, " /ENTRY:mainCRTStartup");
}