Explorar o código

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

Fixes #4660
Feoramund hai 3 meses
pai
achega
1fc390146f
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  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");
 			}