From e4660d34c94d1cf45cacb296bea12871365f0e22 Mon Sep 17 00:00:00 2001 From: Chris Hamons Date: Fri, 12 Oct 2018 10:24:22 -0500 Subject: [PATCH 1/2] [mmp] Include libmono-system-native.a when embedding mono if it exists --- tools/mmp/driver.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tools/mmp/driver.cs b/tools/mmp/driver.cs index 4b58991fa1a7..df35d75967ee 100644 --- a/tools/mmp/driver.cs +++ b/tools/mmp/driver.cs @@ -1347,13 +1347,17 @@ static int Compile () args.Append ("-o ").Append (StringUtils.Quote (AppPath)).Append (' '); args.Append (cflags).Append (' '); if (embed_mono) { - var libmono = "libmonosgen-2.0.a"; - var lib = Path.Combine (libdir, libmono); + string libmono = Path.Combine (libdir, "libmonosgen-2.0.a"); - if (!File.Exists (Path.Combine (lib))) + if (!File.Exists (Path.Combine (libmono))) throw new MonoMacException (5202, true, "Mono.framework MDK is missing. Please install the MDK for your Mono.framework version from http://mono-project.com/Downloads"); - args.Append (StringUtils.Quote (lib)).Append (' '); + args.Append (StringUtils.Quote (libmono)).Append (' '); + + // libmono-system-native.a needs to be included if it exists in the mono in question + string libmonoNative = Path.Combine (libdir, "libmono-system-native.a"); + if (File.Exists (libmonoNative)) + args.Append (StringUtils.Quote (libmonoNative)).Append (' '); if (profiling.HasValue && profiling.Value) { args.Append (StringUtils.Quote (Path.Combine (libdir, "libmono-profiler-log.a"))).Append (' '); From 49d6d8f13f2feef2ec64ec03a12ee4fc374abc3e Mon Sep 17 00:00:00 2001 From: Chris Hamons Date: Fri, 12 Oct 2018 13:20:21 -0500 Subject: [PATCH 2/2] Remove silly function call --- tools/mmp/driver.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/mmp/driver.cs b/tools/mmp/driver.cs index df35d75967ee..7d605a578594 100644 --- a/tools/mmp/driver.cs +++ b/tools/mmp/driver.cs @@ -1349,7 +1349,7 @@ static int Compile () if (embed_mono) { string libmono = Path.Combine (libdir, "libmonosgen-2.0.a"); - if (!File.Exists (Path.Combine (libmono))) + if (!File.Exists (libmono)) throw new MonoMacException (5202, true, "Mono.framework MDK is missing. Please install the MDK for your Mono.framework version from http://mono-project.com/Downloads"); args.Append (StringUtils.Quote (libmono)).Append (' ');