Skip to content

Commit

Permalink
[dotnet] We shouldn't need the workaround for mono_config_parse_memor…
Browse files Browse the repository at this point in the history
…y anymore (since we're building libxamarin referencing the .NET version of libmono). (#10792)

We're now building the .NET version of libxamarin referencing the .NET version
of libmono, which means we don't need this workaround anymore.
  • Loading branch information
rolfbjarne committed Mar 6, 2021
1 parent 2d6a3c4 commit 5f5fbcb
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions tools/dotnet-linker/Steps/GenerateMainStep.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,6 @@ protected override void TryEndProcess ()
contents.AppendLine ("}");
contents.AppendLine ();

if (Configuration.Platform == ApplePlatform.MacOSX) {
// mono_config_parse_memory was removed in .NET: https://github.com/dotnet/runtime/pull/48007
// however, we still use this function in our libxamarin code, and we can't remove it without affecting
// legacy Xamarin.Mac, so just add a dummy implementation of mono_config_parse_memory so that the
// native linker doesn't complain. This is a temporary solution: we'll soon build a .NET-specific
// libxamarin, in which case we can #ifdef out the call to mono_config_parse_memory for .NET only.
contents.AppendLine ("#include <stdio.h>");
contents.AppendLine ("extern \"C\" void mono_config_parse_memory (const char *buffer);");
contents.AppendLine ("void mono_config_parse_memory (const char *buffer)");
contents.AppendLine ("{");
contents.AppendLine ("\tfprintf (stderr, \"mono_config_parse_memory has been removed\\n\");");
contents.AppendLine ("}");
contents.AppendLine ();
}

Configuration.Target.GenerateMain (contents, app.Platform, abi, file, registration_methods);

var item = new MSBuildItem {
Expand Down

1 comment on commit 5f5fbcb

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

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

🔥 Tests failed catastrophically on Build (no summary found). 🔥

Result file $(TEST_SUMMARY_PATH) not found.

Pipeline on Agent

Please sign in to comment.