Browse Source

Let `-no-entry-point` work for Windows DLLs

Fixes #4660
Feoramund 3 months ago
parent
commit
1fc390146f
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/linker.cpp

+ 3 - 0
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");
 			}