Disable the GC pump by default. Fixes #4772. (#4781)

Fixes https://github.com/xamarin/xamarin-macios/issues/4772
This commit is contained in:
Rolf Bjarne Kvinge 2018-09-10 22:42:42 +02:00 коммит произвёл Sebastien Pouliot
Родитель e8e1d4293b
Коммит 93c672fbf1
5 изменённых файлов: 25 добавлений и 13 удалений

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

@ -38,9 +38,7 @@ bool xamarin_detect_unified_build = false;
#if MONOMAC
bool xamarin_use_new_assemblies = false;
#endif
#if MONOTOUCH && DEBUG && (defined (__i386__) || defined (__x86_64__))
bool xamarin_gc_pump = true;
#else
#if DEBUG
bool xamarin_gc_pump = false;
#endif
#if MONOMAC
@ -2216,8 +2214,10 @@ xamarin_get_is_unified ()
void
xamarin_set_gc_pump_enabled (bool value)
{
#if DEBUG
// COOP: no managed memory access: any mode.
xamarin_gc_pump = value;
#endif
}
const char *

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

@ -51,7 +51,9 @@ extern bool xamarin_use_new_assemblies;
#else
#define xamarin_use_new_assemblies 1
#endif
#if DEBUG
extern bool xamarin_gc_pump;
#endif
extern bool xamarin_debug_mode;
extern bool xamarin_disable_lldb_attach;
#if MONOMAC

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

@ -702,6 +702,21 @@ public class B : A {}
}
}
[Test]
public void MT0032 ()
{
using (var mtouch = new MTouchTool ()) {
mtouch.Debug = false;
mtouch.CustomArguments = new string[] { "--debugtrack:true" };
mtouch.WarnAsError = new int[] { 32 };
mtouch.CreateTemporaryApp ();
mtouch.AssertExecuteFailure (MTouchAction.BuildSim, "build");
mtouch.AssertError (32, "The option '--debugtrack' is ignored unless '--debug' is also specified.");
mtouch.AssertErrorCount (1);
mtouch.AssertWarningCount (0);
}
}
[Test]
[TestCase (Profile.iOS, Profile.tvOS)]
[TestCase (Profile.iOS, Profile.watchOS)]

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

@ -1124,15 +1124,10 @@ namespace Xamarin.Bundler {
BitCodeMode = BitCodeMode.LLVMOnly;
}
if (EnableDebug) {
if (!DebugTrack.HasValue) {
DebugTrack = IsSimulatorBuild;
}
} else {
if (DebugTrack.HasValue) {
ErrorHelper.Warning (32, "The option '--debugtrack' is ignored unless '--debug' is also specified.");
}
if (!DebugTrack.HasValue) {
DebugTrack = false;
} else if (DebugTrack.Value && !EnableDebug) {
ErrorHelper.Warning (32, "The option '--debugtrack' is ignored unless '--debug' is also specified.");
}
if (EnableAsmOnlyBitCode)

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

@ -1004,8 +1004,8 @@ namespace Xamarin.Bundler
{ "nofastsim", "Do not run the simulator fast-path build", v => app.NoFastSim = true },
{ "nodevcodeshare", "Do not share native code between extensions and main app.", v => app.NoDevCodeShare = true },
{ "nolink", "Do not link the assemblies", v => app.LinkMode = LinkMode.None },
{ "nodebugtrack", "Disable debug tracking of object resurrection bugs", v => app.DebugTrack = false },
{ "debugtrack:", "Enable debug tracking of object resurrection bugs (enabled by default for the simulator)", v => { app.DebugTrack = ParseBool (v, "--debugtrack"); } },
{ "nodebugtrack", "Disable debug tracking of object resurrection bugs [DEPRECATED - already disabled by default]", v => app.DebugTrack = false, true },
{ "debugtrack:", "Enable debug tracking of object resurrection bugs", v => { app.DebugTrack = ParseBool (v, "--debugtrack"); } },
{ "linkerdumpdependencies", "Dump linker dependencies for linker-analyzer tool", v => app.LinkerDumpDependencies = true },
{ "linksdkonly", "Link only the SDK assemblies", v => app.LinkMode = LinkMode.SDKOnly },
{ "linkskip=", "Skip linking of the specified assembly", v => app.LinkSkipped.Add (v) },