[mtouch] Do not use the process task to execute the copy of aot files. Use a normal child process that blocks. Adds very little overhead since it is similar to the copy we had in c#. (#718)
This commit is contained in:
Коммит
875afb4260
|
@ -1065,8 +1065,26 @@ namespace Xamarin.Bundler {
|
|||
return;
|
||||
if (!Directory.Exists (src)) // got no aot data
|
||||
return;
|
||||
var copyProcess = new MsymCopyTask (src, dest);
|
||||
copyProcess.Execute ();
|
||||
|
||||
var p = new Process ();
|
||||
p.StartInfo.UseShellExecute = false;
|
||||
p.StartInfo.RedirectStandardOutput = true;
|
||||
p.StartInfo.RedirectStandardError = true;
|
||||
p.StartInfo.FileName = "mono-symbolicate";
|
||||
p.StartInfo.Arguments = $"store-symbols \"{src}\" \"{dest}\"";
|
||||
|
||||
if (p.Start ()) {
|
||||
var error = p.StandardError.ReadToEnd();
|
||||
p.WaitForExit ();
|
||||
if (p.ExitCode == 0)
|
||||
return;
|
||||
else {
|
||||
Console.Error.WriteLine ($"Msym files could not be copied from {src} to {dest}: {error}.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Console.Error.WriteLine ($"Msym files could not be copied from {src} to {dest}: Could not start process.");
|
||||
}
|
||||
|
||||
void BuildFinalExecutable ()
|
||||
|
@ -1829,29 +1847,6 @@ namespace Xamarin.Bundler {
|
|||
}
|
||||
}
|
||||
|
||||
public class MsymCopyTask : ProcessTask {
|
||||
|
||||
public string Source { get; set; }
|
||||
public string Destination { get; set; }
|
||||
|
||||
public MsymCopyTask (string source, string destination)
|
||||
{
|
||||
Source = source;
|
||||
Destination = destination;
|
||||
ProcessStartInfo.FileName = "mono-symbolicate";
|
||||
ProcessStartInfo.Arguments = $"store-symbols \"{Source}\" \"{Destination}\"";
|
||||
}
|
||||
|
||||
protected override void Build ()
|
||||
{
|
||||
var exit_code = base.Start ();
|
||||
if (exit_code == 0)
|
||||
return;
|
||||
|
||||
Console.Error.WriteLine ("Msym files could not be copied from {Source} to {Destination}");
|
||||
}
|
||||
}
|
||||
|
||||
public class AOTTask : ProcessTask {
|
||||
public string AssemblyName;
|
||||
|
||||
|
|
|
@ -98,9 +98,11 @@ namespace Xamarin.Bundler {
|
|||
public void CopyMSymToDirectory (string directory)
|
||||
{
|
||||
string msym_src = FullPath + ".aotid.msym";
|
||||
var dirInfo = new DirectoryInfo (msym_src);
|
||||
if (!dirInfo.Exists) // got no aot data
|
||||
if (!Directory.Exists (msym_src)) // got no aot data
|
||||
return;
|
||||
if (!Directory.Exists (directory)) {
|
||||
Directory.CreateDirectory (directory);
|
||||
}
|
||||
Application.CopyMsymData (msym_src, directory);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче