[mkbundle] Fix --nomain option for Windows
authorAlexis Christoforides <alexis@thenull.net>
Fri, 18 Dec 2015 02:38:10 +0000 (21:38 -0500)
committerAlexis Christoforides <alexis@thenull.net>
Fri, 18 Dec 2015 02:38:20 +0000 (21:38 -0500)
mcs/tools/mkbundle/mkbundle.cs

index f31122493664c4a969af92ff40edf22ec7a553db..697ab87701763c3a80e830741c9ddf90fb0b7b7a 100755 (executable)
@@ -503,6 +503,10 @@ void          mono_register_config_for_assembly (const char* assembly_name, cons
                                compilerArgs.Add(temp_o);
                                compilerArgs.Add("/link");
 
+                               if (nomain)
+                                       compilerArgs.Add("/NOENTRY");
+                                       compilerArgs.Add("/DLL");
+
                                foreach (string lib in libs)
                                        compilerArgs.Add(String.Format ("/LIBPATH:{0}", quote(lib)));
                                compilerArgs.Add (quote(monoFile));