Skip to content

Commit d8c5af9

Browse files
authored
[tools] Don't set MONO_GC_PARAMS if we're not using Mono.
1 parent 18f02dc commit d8c5af9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tools/common/Target.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,8 @@ void GenerateMacMain (StringWriter sw)
588588
if (App.EnableDebug)
589589
sw.WriteLine ("\txamarin_debug_mode = TRUE;");
590590

591-
sw.WriteLine ($"\tsetenv (\"MONO_GC_PARAMS\", \"{App.MonoGCParams}\", 1);");
591+
if (!string.IsNullOrEmpty (App.MonoGCParams) && App.XamarinRuntime == XamarinRuntime.MonoVM)
592+
sw.WriteLine ($"\tsetenv (\"MONO_GC_PARAMS\", \"{App.MonoGCParams}\", 1);");
592593

593594
sw.WriteLine ("\txamarin_supports_dynamic_registration = {0};", App.DynamicRegistrationSupported ? "TRUE" : "FALSE");
594595

@@ -774,7 +775,7 @@ void GenerateIOSMain (StringWriter sw, Abi abi)
774775
sw.WriteLine ("\txamarin_marshal_objectivec_exception_mode = MarshalObjectiveCExceptionMode{0};", app.MarshalObjectiveCExceptions);
775776
if (app.EnableDebug)
776777
sw.WriteLine ("\txamarin_debug_mode = TRUE;");
777-
if (!string.IsNullOrEmpty (app.MonoGCParams))
778+
if (!string.IsNullOrEmpty (app.MonoGCParams) && app.XamarinRuntime == XamarinRuntime.MonoVM)
778779
sw.WriteLine ("\tsetenv (\"MONO_GC_PARAMS\", \"{0}\", 1);", app.MonoGCParams);
779780
// Do this last, so that the app developer can override any other environment variable we set.
780781
foreach (var kvp in app.EnvironmentVariables) {

0 commit comments

Comments
 (0)