Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mmp] Include libmono-system-native.a when embedding mono if it exists #4980

Merged
merged 2 commits into from
Oct 15, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions tools/mmp/driver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not new code - but there's no point in combining a single value ;-)
i.e. remove Path.Combine

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 (' ');
Expand Down