Skip to content

Commit 1d65825

Browse files
jonpryorgrendello
authored andcommitted
Bump to mono/mono-4.8.0-branch/9e164326, Java.Interop/a1d3ecc8 (dotnet#223)
Mono 4.8 has new SGEN bridge performance characteristics and semantics, requiring that we bump the SGEN Bridge Version to 5. Additionally, Mono 4.8 is using Cecil/master, which is API INCOMPATIBLE with Cecil 0.9.6, and Mono sources are included in `Xamarin.Android.Build.Tasks.dll`. We could attempt to address the Cecil incompatibility by building Mono's `external/cecil` projects, but that doesn't work because Java.Interop assemblies *also* use Cecil, and `Xamarin.Android.Build.Tasks.dll` uses `Java.Interop.Tools.Cecil.dll`, which uses Cecil via NuGet package, so everything gets very intermixed and confusing if Java.Interop tries to use e.g. Cecil 0.9.6 via nuget while xamarin-android attempts to use Cecil via Mono's source. Skip that problem, and bump to Java.Interop/a1d3ecc8, which in turn uses the Cecil 0.10.0-beta1-v2 *Preview* NuGet package, which is API compoatible with Cecil/master and mono/master. Additionally, update xamarin-android's Cecil 0.9.6 use to likewise use Cecil 0.10.0-beta1-v2. This allows xamarin-android to build while using Mono 4.8 sources. Finally, there's lots of "unrelated noise" in this patch, largely because every time I add a project to the solution via Xamarin Studio, Xamarin Studio decides to modify EVERY PROJECT IN THE REPO. Preserve some of these changes -- and "fix" others -- so that I can reduce the "visual noise" of future Xamarin Studio changes.
1 parent 4f6a0af commit 1d65825

21 files changed

+134
-109
lines changed

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[submodule "external/mono"]
66
path = external/mono
77
url = https://github.com/mono/mono.git
8-
branch = mono-4.6.0-branch
8+
branch = mono-4.8.0-branch
99
[submodule "external/mxe"]
1010
path = external/mxe
1111
url = https://github.com/xamarin/mxe.git

Configuration.props

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
<NeedMxe Condition=" '$(HostOS)' == 'Darwin' ">true</NeedMxe>
2626
<MakeConcurrency Condition=" '$(MakeConcurrency)' == '' And '$(HostCpuCount)' != '' ">-j$(HostCpuCount)</MakeConcurrency>
2727
<ManagedRuntime Condition=" '$(ManagedRuntime)' == '' And '$(OS)' != 'Windows_NT' ">mono</ManagedRuntime>
28-
<MonoSgenBridgeVersion Condition=" '$(MonoSgenBridgeVersion)' == '' ">4</MonoSgenBridgeVersion>
28+
<ManagedRuntimeArgs Condition=" '$(ManagedRuntimeArgs)' == '' And '$(ManagedRuntime)' == 'mono' ">--debug=casts</ManagedRuntimeArgs>
29+
<MonoSgenBridgeVersion Condition=" '$(MonoSgenBridgeVersion)' == '' ">5</MonoSgenBridgeVersion>
2930
<TargetFrameworkRootPath>$(MSBuildThisFileDirectory)bin\$(Configuration)\lib\xbuild-frameworks</TargetFrameworkRootPath>
3031
<HOME Condition=" '$(HOME)' == '' ">$(HOMEDRIVE)$(HOMEPATH)</HOME>
3132
<AndroidApiLevel Condition=" '$(AndroidApiLevel)' == '' ">24</AndroidApiLevel>

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ Overridable MSBuild properties include:
9797
* `$(MonoSgenBridgeVersion)`: The Mono SGEN Bridge version to support.
9898
Valid values include:
9999

100-
* `4`: Mono 4.6 support. This is the default.
101-
* `5`: Mono 4.8 support.
100+
* `4`: Mono 4.6 support.
101+
* `5`: Mono 4.8 support. This is the default.
102102

103103
# Build Requirements
104104

build-tools/libzip/libzip.mdproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</PropertyGroup>
1414
<Import Project="$(MSBuildBinPath)\Microsoft.Common.targets" />
1515
<PropertyGroup>
16-
<BuildDependsOn/>
16+
<BuildDependsOn />
1717
<BuildDependsOn Condition="'$(HostOS)' == 'Windows' OR '$(HostOS)' == 'Darwin'">
1818
ResolveReferences;
1919
_BuildUnlessCached

build-tools/unix-distribution-setup/unix-distribution-setup.mdproj

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,14 @@
66
<ItemType>GenericProject</ItemType>
77
<ProjectGuid>{2CF172E5-BDAE-4ABA-8BC8-08040ED3E77A}</ProjectGuid>
88
</PropertyGroup>
9+
<Import Project="..\..\Configuration.props" />
910
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
1011
<OutputPath>..\..\bin\Debug\</OutputPath>
1112
</PropertyGroup>
1213
<PropertyGroup Condition="'$(Configuration)'=='Release'">
1314
<OutputPath>..\..\bin\Release\</OutputPath>
1415
</PropertyGroup>
1516

16-
<Import Project="..\..\Configuration.props" />
17-
18-
<Target Name="Build">
19-
<Copy SourceFiles="..\..\tools\scripts\generator" DestinationFiles="$(OutputPath)bin\generator" />
20-
<Exec
21-
Condition=" '$(HostOS)' != 'Windows' "
22-
Command="chmod +x $(OutputPath)bin\generator" />
23-
</Target>
24-
25-
<Target Name="Clean">
26-
<Delete Files="$(OutputPath)bin\generator" />
27-
</Target>
17+
<Import Project="unix-distribution-setup.targets" />
2818
</Project>
2919

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
3+
<Target Name="Build">
4+
<Copy
5+
SourceFiles="..\..\tools\scripts\generator"
6+
DestinationFiles="$(OutputPath)bin\generator"
7+
/>
8+
<Exec
9+
Condition=" '$(HostOS)' != 'Windows' "
10+
Command="chmod +x $(OutputPath)bin\generator"
11+
/>
12+
</Target>
13+
14+
<Target Name="Clean">
15+
<Delete Files="$(OutputPath)bin\generator" />
16+
</Target>
17+
</Project>
18+

external/Java.Interop

external/mono

Submodule mono updated 1331 files

src/Mono.Android/Mono.Android.targets

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,13 @@
9494
<MakeDir Directories="$(IntermediateOutputPath)jcw;$(IntermediateOutputPath)jcw\bin" />
9595
<PropertyGroup>
9696
<OutputPathAbs>$(MSBuildProjectDirectory)\$(OutputPath)</OutputPathAbs>
97-
<JcwGen>$(JavaInteropFullPath)\bin\$(Configuration)\jcw-gen.exe</JcwGen>
97+
<JcwGen>"$(JavaInteropFullPath)\bin\$(Configuration)\jcw-gen.exe" -v10</JcwGen>
9898
<_LibDirs>-L "$(OutputPathAbs)" -L "$(OutputPathAbs)..\v1.0\" -L "$(OutputPathAbs)..\v1.0\Facades"</_LibDirs>
9999
<_Assembly>"$(OutputPathAbs)$(AssemblyName).dll"</_Assembly>
100100
<_Out>-o "$(MSBuildProjectDirectory)\$(IntermediateOutputPath)jcw\src"</_Out>
101101
</PropertyGroup>
102102
<Exec
103-
Command="$(ManagedRuntime) $(JcwGen) $(_Out) $(_LibDirs) $(_Assembly)"
103+
Command="$(ManagedRuntime) $(ManagedRuntimeArgs) $(JcwGen) $(_Out) $(_LibDirs) $(_Assembly)"
104104
/>
105105
<ItemGroup>
106106
<_JavaSources Include="$(IntermediateOutputPath)jcw\src\**\*.java" />

src/Mono.Data.Sqlite/Mono.Data.Sqlite.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
<AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
1414
<AssemblyName>Mono.Data.Sqlite</AssemblyName>
1515
<SignAssembly>true</SignAssembly>
16+
<AndroidApplication>false</AndroidApplication>
17+
<AndroidUseLatestPlatformSdk>false</AndroidUseLatestPlatformSdk>
1618
</PropertyGroup>
1719
<Import Project="..\..\Configuration.props" />
1820
<PropertyGroup>
@@ -27,6 +29,7 @@
2729
<DefineConstants>DEBUG;TRACE;NET_4_0;NET_4_5;MONO;DISABLE_CAS_USE;SQLITE_STANDARD;MONODROID</DefineConstants>
2830
<ErrorReport>prompt</ErrorReport>
2931
<WarningLevel>4</WarningLevel>
32+
<AndroidUseSharedRuntime>True</AndroidUseSharedRuntime>
3033
<AndroidLinkMode>None</AndroidLinkMode>
3134
<ConsolePause>false</ConsolePause>
3235
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>

src/Mono.Posix/Mono.Posix.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
<AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
1414
<AssemblyName>Mono.Posix</AssemblyName>
1515
<SignAssembly>true</SignAssembly>
16+
<AndroidApplication>false</AndroidApplication>
17+
<AndroidUseLatestPlatformSdk>false</AndroidUseLatestPlatformSdk>
1618
</PropertyGroup>
1719
<Import Project="..\..\Configuration.props" />
1820
<PropertyGroup>
@@ -26,6 +28,7 @@
2628
<OutputPath>..\..\bin\$(Configuration)\lib\xbuild-frameworks\MonoAndroid\v1.0</OutputPath>
2729
<DefineConstants>DEBUG;TRACE;NET_4_0;NET_4_5;MONO;DISABLE_CAS_USE;MONODROID</DefineConstants>
2830
<ErrorReport>prompt</ErrorReport>
31+
<AndroidUseSharedRuntime>True</AndroidUseSharedRuntime>
2932
<WarningLevel>4</WarningLevel>
3033
<AndroidLinkMode>None</AndroidLinkMode>
3134
<ConsolePause>false</ConsolePause>

src/OpenTK-1.0/OpenTK.csproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
<NoWarn>3001,3002,3003,3005,3006,3021,3014,0618,1591,0414,0169,0419,1635</NoWarn>
2020
<NoStdLib>true</NoStdLib>
2121
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
22+
<AndroidApplication>false</AndroidApplication>
23+
<AndroidUseLatestPlatformSdk>false</AndroidUseLatestPlatformSdk>
2224
</PropertyGroup>
2325
<Import Project="..\..\Configuration.props" />
2426
<PropertyGroup>
@@ -67,7 +69,7 @@
6769
</Reference>
6870
</ItemGroup>
6971
<ItemGroup>
70-
<Compile Include="GlobalAssemblyInfo.cs"/>
72+
<Compile Include="GlobalAssemblyInfo.cs" />
7173
<Compile Include="$(OpenTKSourceDirectory)\Source\OpenTK\Audio\AudioCapture.cs">
7274
<Link>Audio\AudioCapture.cs</Link>
7375
</Compile>

src/System.Drawing.Primitives/System.Drawing.Primitives.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
<RootNamespace>System.Drawing</RootNamespace>
1010
<AssemblyName>System.Drawing.Primitives</AssemblyName>
1111
<NoStdLib>true</NoStdLib>
12+
<AndroidApplication>false</AndroidApplication>
13+
<MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
14+
<MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
15+
<AndroidUseLatestPlatformSdk>false</AndroidUseLatestPlatformSdk>
1216
</PropertyGroup>
1317
<Import Project="..\..\Configuration.props" />
1418
<PropertyGroup>

src/Xamarin.Android.Build.Tasks/Linker/MonoDroid.Tuner/Extensions.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ public static bool Implements (TypeDefinition type, string interfaceName, bool g
6060
while (type != null) {
6161
// does the type implements it itself
6262
if (type.HasInterfaces) {
63-
foreach (TypeReference iface in type.Interfaces) {
63+
foreach (var ifaceInfo in type.Interfaces) {
64+
var iface = ifaceInfo.InterfaceType;
6465
string fullname = (generic) ? iface.GetElementType ().FullName : iface.FullName;
6566
if (fullname == interfaceName)
6667
return true;

src/Xamarin.Android.Build.Tasks/Linker/MonoDroid.Tuner/FixAbstractMethodsStep.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@ bool FixAbstractMethods (TypeDefinition type)
137137
foreach (var baseType in type.GetBaseTypes ())
138138
typeMethods.AddRange (baseType.Methods);
139139

140-
foreach (var iface in type.Interfaces) {
140+
foreach (var ifaceInfo in type.Interfaces) {
141+
var iface = ifaceInfo.InterfaceType;
141142
var ifaceDef = iface.Resolve ();
142143
if (ifaceDef == null) {
143144
if (Context.LogInternalExceptions)

src/Xamarin.Android.Build.Tasks/Linker/MonoDroid.Tuner/PreserveLinqExpressions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ bool IsLinqProvider (TypeDefinition type)
4545
return false; // we are not looking for default system types.
4646
if (!type.HasInterfaces)
4747
return false;
48-
return type.Interfaces.Any (i => i.FullName == "System.Linq.IQueryProvider")
49-
|| type.Interfaces.Select (t => t.Resolve ()).Any (t => t != null && IsLinqProvider (t));
48+
return type.Interfaces.Any (i => i.InterfaceType.FullName == "System.Linq.IQueryProvider")
49+
|| type.Interfaces.Select (t => t.InterfaceType.Resolve ()).Any (t => t != null && IsLinqProvider (t));
5050
}
5151
}
5252
}

0 commit comments

Comments
 (0)