[mcs] Accept and ignore command line args supported by csc ..
[mono.git] / mcs / mcs / settings.cs
index 9b366d636d852ef5040f9d0d6d145a2b542dfbc1..7b092135a2b09601d4e7d20a7ed471aac6799ea7 100644 (file)
@@ -583,15 +583,21 @@ namespace Mono.CSharp {
                {
                        bool valid = true;
                        foreach (string wid in text.Split (numeric_value_separator, StringSplitOptions.RemoveEmptyEntries)) {
+                               var warning = wid;
+                               if (warning.Length == 6 && warning [0] == 'C' && warning [1] == 'S')
+                                       warning = warning.Substring (2);
+
                                int id;
-                               if (!int.TryParse (wid, NumberStyles.AllowLeadingWhite, CultureInfo.InvariantCulture, out id)) {
-                                       report.Error (1904, "`{0}' is not a valid warning number", wid);
-                                       valid = false;
+                               if (!int.TryParse (warning, NumberStyles.AllowLeadingWhite, CultureInfo.InvariantCulture, out id)) {
                                        continue;
                                }
 
-                               if (report.CheckWarningCode (id, Location.Null))
+                               if (report.CheckWarningCode (id, Location.Null)) {
                                        action (id);
+                               } else {
+                                       report.Error (1904, "`{0}' is not a valid warning number", wid);
+                                       valid = false;
+                               }
                        }
 
                        return valid;
@@ -1204,6 +1210,14 @@ namespace Mono.CSharp {
                                settings.RuntimeMetadataVersion = value;
                                return ParseResult.Success;
 
+                       // csc options that we don't support
+                       case "/utf8output":
+                       case "/subsystemversion":
+                       case "/highentropyva":
+                       case "/highentropyva+":
+                       case "/highentropyva-":
+                               return ParseResult.Success;
+
                        default:
                                return ParseResult.UnknownOption;
                        }
@@ -1561,7 +1575,7 @@ namespace Mono.CSharp {
                                "   -help                Lists all compiler options (short: -?)\n" +
                                "   -keycontainer:NAME   The key pair container used to sign the output assembly\n" +
                                "   -keyfile:FILE        The key file used to strongname the ouput assembly\n" +
-                               "   -langversion:TEXT    Specifies language version: ISO-1, ISO-2, 3, 4, 5, Default or Future\n" +
+                               "   -langversion:TEXT    Specifies language version: ISO-1, ISO-2, 3, 4, 5, Default or Experimental\n" +
                                "   -lib:PATH1[,PATHn]   Specifies the location of referenced assemblies\n" +
                                "   -main:CLASS          Specifies the class with the Main method (short: -m)\n" +
                                "   -noconfig            Disables implicitly referenced assemblies\n" +