Created attachment 19800 [details]
When I compile our iOS app for Release|iPhone I keep getting MT3001 errors. I tracked the change that caused this down and have attached a simple sample project to demonstrate the issue.
We use PaintCode to generate C# for vectors used within the app. This is what generated the code that seems to be causing the AOT compiler issues.
If I disable the LLVM optimising compiler option in the iOS build screen the project will compile without error.
Hopefully you can figure out whats happening.
Xamarin studio setup:
=== Xamarin Studio Enterprise ===
Version 6.1.5 (build 0)
Installation UUID: 7ee048db-6273-472d-a332-6b78c7e2b631
Mono 4.6.2 (mono-4.6.0-branch/ac9e222) (64-bit)
GTK+ 2.24.23 (Raleigh theme)
Package version: 406020016
=== NuGet ===
=== Xamarin.Profiler ===
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
=== Apple Developer Tools ===
Xcode 8.2 (11766)
=== Xamarin.Android ===
Version: 22.214.171.124 (Visual Studio Enterprise Trial)
Android SDK: /Users/206492439/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
4.0.3 (API level 15)
4.4 (API level 19)
6.0 (API level 23)
SDK Tools Version: 25.2.5
SDK Platform Tools Version: 25.0.3
SDK Build Tools Version: 23.0.2
Java SDK: /usr
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)
Android Designer EPL code available here:
=== Xamarin Android Player ===
=== Xamarin.Mac ===
Version: 126.96.36.199 (Visual Studio Enterprise Trial)
=== Xamarin.iOS ===
Version: 10.3.1.8 (Visual Studio Enterprise Trial)
Build date: 2016-12-20 02:58:14-0500
=== Build Information ===
Release ID: 601050000
Git revision: 7494718e127af9eaec45a3bd6282d3da927488bd
Build date: 2017-01-17 10:31:01-05
Xamarin addins: c92d0626d347aaa02839689eaac2961d24c9f446
Build lane: monodevelop-lion-cycle8
=== Operating System ===
Mac OS X 10.12.3
Darwin UKCSGOSX-90G8WN 16.4.0 Darwin Kernel Version 16.4.0
Thu Dec 22 22:53:21 PST 2016
I can confirm I'm seeing the same results: I get the build error trying to build with LLVM, but builds successfully without LLVM.
The problem is indeed caused by the huge MemberAppStyleKit:DrawInTheRough () method which overflows some table in the jit. A workaround would be to disable llvm, or to break this method into smaller ones.
This has been fixed by mono master/7bfb9bcb78255b5314e3c9f5489a76e74154435b, it will take some time until the fix shows up in a xamarin.ios version.
Note that the fix is low risk so it could in theory make C9.
@Zoltan, if you're fine in back porting this to mono-4.8.0-branch then we'll do the bumps and mark it solved (so QA can verify).
cycle9 PR https://github.com/xamarin/xamarin-macios/pull/1696
https://github.com/xamarin/xamarin-macios/commit/c351bf25f847855c907c04e9ed7e9c2ccf578511cycle9 merged in
master PR https://github.com/xamarin/xamarin-macios/pull/1698
master merged in https://github.com/xamarin/xamarin-macios/commit/a4af7e58782d15dcab5bd2cdf926ac2ce599c808