Merge pull request #4152 from BrzVlad/misc-gc-altstack
[mono.git] / mcs / class / Microsoft.Build.Tasks / Microsoft.Build.Tasks / ManagedCompiler.cs
index 75eb5fa4b28fbed98e68f515c3229b729313f1a3..19eec8686542011b04d2515874b9a86450136161 100644 (file)
@@ -58,7 +58,11 @@ namespace Microsoft.Build.Tasks {
                        if (Bag ["CodePage"] != null)
                                commandLine.AppendSwitchIfNotNull ("/codepage:", CodePage.ToString ());
 
-                       commandLine.AppendSwitchIfNotNull ("/debug:", DebugType);
+                       var dtype = DebugType;
+                       if (string.Equals (dtype, "full", StringComparison.OrdinalIgnoreCase) || string.Equals (dtype, "pdbonly", StringComparison.OrdinalIgnoreCase))
+                               dtype = "portable";
+
+                       commandLine.AppendSwitchIfNotNull ("/debug:", dtype);
 
                        if (Bag ["DelaySign"] != null)
                                if (DelaySign)
@@ -67,12 +71,15 @@ namespace Microsoft.Build.Tasks {
                                        commandLine.AppendSwitch ("/delaysign-");
                        if (Bag ["EmitDebugInformation"] != null)
                                if (EmitDebugInformation)
-                                       commandLine.AppendSwitch ("/debug+");
+                                       commandLine.AppendSwitch ("/debug:portable");
                                else
                                        commandLine.AppendSwitch ("/debug-");
                        //fileAlignment
                        commandLine.AppendSwitchIfNotNull ("/keycontainer:", KeyContainer);
                        commandLine.AppendSwitchIfNotNull ("/keyfile:", KeyFile);
+                       if (KeyFile != null && !DelaySign)
+                               commandLine.AppendSwitch("/publicsign");
+
                        // FIXME: add ids from metadata
                        if (LinkResources != null)
                                foreach (ITaskItem item in LinkResources)