X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fmcs%2Fsettings.cs;h=b3108a570143f39a399a02cc991aa92dd69e38fc;hb=bf2e7742789a4a27df8d36e85299f1a3bacb0b22;hp=5a76b965889697d1462b92b3b08540348942ee71;hpb=bbb050d0bd8f910c9d3884009b84e6d40bb89a00;p=mono.git diff --git a/mcs/mcs/settings.cs b/mcs/mcs/settings.cs index 5a76b965889..b3108a57014 100644 --- a/mcs/mcs/settings.cs +++ b/mcs/mcs/settings.cs @@ -87,6 +87,8 @@ namespace Mono.CSharp { // public List> AssemblyReferencesAliases; + public List> PathMap; + // // Modules to be embedded // @@ -1210,11 +1212,38 @@ namespace Mono.CSharp { settings.RuntimeMetadataVersion = value; return ParseResult.Success; + case "/pathmap": + if (value.Length == 0) { + return ParseResult.Success; + } + + foreach (var pair in value.Split (',')) { + var kv = pair.Split ('='); + if (kv.Length != 2) { + report.Error (8101, "The pathmap option was incorrectly formatted"); + return ParseResult.Error; + } + + if (settings.PathMap == null) + settings.PathMap = new List> (); + + var key = kv [0].TrimEnd (Path.DirectorySeparatorChar); + var path = kv [1].TrimEnd (Path.DirectorySeparatorChar); + if (key.Length == 0 || path.Length == 0) + report.Error (8101, "The pathmap option was incorrectly formatted"); + + settings.PathMap.Add (new KeyValuePair (key, path)); + } + + return ParseResult.Success; + // csc options that we don't support case "/analyzer": case "/appconfig": case "/baseaddress": case "/deterministic": + case "/deterministic+": + case "/deterministic-": case "/errorendlocation": case "/errorlog": case "/features": @@ -1224,7 +1253,6 @@ namespace Mono.CSharp { case "/link": case "/moduleassemblyname": case "/nowin32manifest": - case "/pathmap": case "/pdb": case "/preferreduilang": case "/publicsign": @@ -1595,7 +1623,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 Experimental\n" + + " -langversion:TEXT Specifies language version: ISO-1, ISO-2, 3, 4, 5, 6, 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" + @@ -1603,6 +1631,7 @@ namespace Mono.CSharp { " -nowarn:W1[,Wn] Suppress one or more compiler warnings\n" + " -optimize[+|-] Enables advanced compiler optimizations (short: -o)\n" + " -out:FILE Specifies output assembly name\n" + + " -pathmap:K=V[,Kn=Vn] Sets a mapping for source path names used in generated output\n" + " -pkg:P1[,Pn] References packages P1..Pn\n" + " -platform:ARCH Specifies the target platform of the output assembly\n" + " ARCH can be one of: anycpu, anycpu32bitpreferred, arm,\n" +