You've already forked linux-packaging-mono
Imported Upstream version 5.12.0.220
Former-commit-id: c477e03582759447177c6d4bf412cd2355aad476
This commit is contained in:
parent
8bd104cef2
commit
8fc30896db
@ -46,6 +46,17 @@ namespace ILLink.Tasks
|
||||
/// </summary>
|
||||
public ITaskItem [] RootDescriptorFiles { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Boolean specifying whether to clear initlocals flag on methods.
|
||||
/// </summary>
|
||||
public bool ClearInitLocals { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// A comma-separated list of assemblies whose methods
|
||||
/// should have initlocals flag cleared if ClearInitLocals is true.
|
||||
/// </summary>
|
||||
public string ClearInitLocalsAssemblies { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Extra arguments to pass to illink, delimited by spaces.
|
||||
/// </summary>
|
||||
@ -61,7 +72,8 @@ namespace ILLink.Tasks
|
||||
string [] args = GenerateCommandLineCommands ();
|
||||
var argsString = String.Join (" ", args);
|
||||
Log.LogMessageFromText ($"illink {argsString}", MessageImportance.Normal);
|
||||
int ret = Mono.Linker.Driver.Main (args);
|
||||
var logger = new AdapterLogger (Log);
|
||||
int ret = Mono.Linker.Driver.Execute (args, logger);
|
||||
return ret == 0;
|
||||
}
|
||||
|
||||
@ -104,6 +116,17 @@ namespace ILLink.Tasks
|
||||
args.Add (OutputDirectory.ItemSpec);
|
||||
}
|
||||
|
||||
if (ClearInitLocals) {
|
||||
args.Add ("-s");
|
||||
// Version of ILLink.CustomSteps is passed as a workaround for msbuild issue #3016
|
||||
args.Add ("ILLink.CustomSteps.ClearInitLocalsStep,ILLink.CustomSteps,Version=0.0.0.0:OutputStep");
|
||||
if ((ClearInitLocalsAssemblies != null) && (ClearInitLocalsAssemblies.Length > 0)) {
|
||||
args.Add ("-m");
|
||||
args.Add ("ClearInitLocalsAssemblies");
|
||||
args.Add (ClearInitLocalsAssemblies);
|
||||
}
|
||||
}
|
||||
|
||||
if (ExtraArgs != null) {
|
||||
args.AddRange (ExtraArgs.Split (' '));
|
||||
}
|
||||
|
Reference in New Issue
Block a user