[mtouch] Clear the MONO_THREADS_SUSPEND environment variable before calling the AOT compiler. Works around mono/mono#11765.

Visual Studio for Mac may set MONO_THREADS_SUSPEND, and this ends up confusing
the AOT compiler when compiling for watchOS.

So unset the environment variable before calling the AOT compiler.

Works around https://github.com/mono/mono/issues/11765.
This commit is contained in:
Rolf Bjarne Kvinge 2018-11-27 08:45:16 +01:00
Родитель 23b7847066
Коммит 428310c181
1 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -290,6 +290,12 @@ namespace Xamarin.Bundler {
ProcessStartInfo = Driver.CreateStartInfo (App, aotCompiler, aotArgs, Path.GetDirectoryName (assembly_path)),
AotInfo = aotInfo,
};
if (App.Platform == ApplePlatform.WatchOS) {
// Visual Studio for Mac sets this environment variable, and it confuses the AOT compiler.
// So unset it.
// See https://github.com/mono/mono/issues/11765
task.ProcessStartInfo.EnvironmentVariables ["MONO_THREADS_SUSPEND"] = null;
}
aotInfo.Task = task;
}