From 1fc390146f247b3770af887ce2592573d5803fe5 Mon Sep 17 00:00:00 2001 From: Feoramund <161657516+Feoramund@users.noreply.github.com> Date: Tue, 10 Jun 2025 08:54:28 -0400 Subject: Let `-no-entry-point` work for Windows DLLs Fixes #4660 --- src/linker.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/linker.cpp') 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"); } -- cgit v1.2.3