Skip to content

Commit 521357c

Browse files
grendellojonpryor
authored andcommitted
[mono-runtimes] Build mono if monodroid profile is missing (#39)
If the mono build was aborted for whatever reason and the monodroid profile wasn't built completely (or at all) the current targets will not fail because they won't see any of the outputs missing and the _InstallBcl target will happily accept empty set for @(_Assemblies). We currently depend on a manually added full list of the monodroid profile assemblies (sans Mono.Data.Sqlite which will is built separately elsewhere and will not be built as part of the profile eventually), but we will implement a way to dynamically obtain the list of assemblies from mono.
1 parent 4f0740d commit 521357c

File tree

1 file changed

+54
-5
lines changed

1 file changed

+54
-5
lines changed

build-tools/mono-runtimes/mono-runtimes.targets

Lines changed: 54 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,60 @@
44
<_SourceTopDir>..\..</_SourceTopDir>
55
<_BclFrameworkDir>$(OutputPath)\lib\xbuild-frameworks\MonoAndroid\v1.0</_BclFrameworkDir>
66
<_MonoPath>$(_SourceTopDir)\external\mono</_MonoPath>
7+
<_MonoProfileDir>$(_MonoPath)\mcs\class\lib\monodroid</_MonoProfileDir>
78
</PropertyGroup>
89
<UsingTask AssemblyFile="$(_SourceTopDir)\bin\Build$(Configuration)\Xamarin.Android.Tools.BootstrapTasks.dll" TaskName="Xamarin.Android.Tools.BootstrapTasks.GetNugetPackageBasePath" />
910
<Import Project="$(_SourceTopDir)\Configuration.props" />
1011
<Import Project="mono-runtimes.props" />
1112
<Import Project="mono-runtimes.projitems" />
13+
<ItemGroup>
14+
<_BclAssembly Include="I18N.CJK.dll"/>
15+
<_BclAssembly Include="I18N.dll"/>
16+
<_BclAssembly Include="I18N.MidEast.dll"/>
17+
<_BclAssembly Include="I18N.Other.dll"/>
18+
<_BclAssembly Include="I18N.Rare.dll"/>
19+
<_BclAssembly Include="I18N.West.dll"/>
20+
<_BclAssembly Include="Microsoft.CSharp.dll"/>
21+
<_BclAssembly Include="Mono.Cairo.dll"/>
22+
<_BclAssembly Include="Mono.CompilerServices.SymbolWriter.dll"/>
23+
<_BclAssembly Include="Mono.CSharp.dll"/>
24+
<_BclAssembly Include="Mono.Data.Tds.dll"/>
25+
<_BclAssembly Include="Mono.Security.dll"/>
26+
<_BclAssembly Include="Mono.Security.Providers.DotNet.dll"/>
27+
<_BclAssembly Include="Mono.Security.Providers.NewSystemSource.dll"/>
28+
<_BclAssembly Include="Mono.Security.Providers.NewTls.dll"/>
29+
<_BclAssembly Include="mscorlib.dll"/>
30+
<_BclAssembly Include="SMDiagnostics.dll"/>
31+
<_BclAssembly Include="System.ComponentModel.Composition.dll"/>
32+
<_BclAssembly Include="System.ComponentModel.DataAnnotations.dll"/>
33+
<_BclAssembly Include="System.Core.dll"/>
34+
<_BclAssembly Include="System.Data.dll"/>
35+
<_BclAssembly Include="System.Data.Services.Client.dll"/>
36+
<_BclAssembly Include="System.dll"/>
37+
<_BclAssembly Include="System.IO.Compression.dll"/>
38+
<_BclAssembly Include="System.IO.Compression.FileSystem.dll"/>
39+
<_BclAssembly Include="System.Json.dll"/>
40+
<_BclAssembly Include="System.Net.dll"/>
41+
<_BclAssembly Include="System.Net.Http.dll"/>
42+
<_BclAssembly Include="System.Net.Http.WebRequest.dll"/>
43+
<_BclAssembly Include="System.Numerics.dll"/>
44+
<_BclAssembly Include="System.Runtime.Serialization.dll"/>
45+
<_BclAssembly Include="System.ServiceModel.dll"/>
46+
<_BclAssembly Include="System.ServiceModel.Internals.dll"/>
47+
<_BclAssembly Include="System.ServiceModel.Web.dll"/>
48+
<_BclAssembly Include="System.Transactions.dll"/>
49+
<_BclAssembly Include="System.Web.Services.dll"/>
50+
<_BclAssembly Include="System.Windows.dll"/>
51+
<_BclAssembly Include="System.Xml.dll"/>
52+
<_BclAssembly Include="System.Xml.Linq.dll"/>
53+
<_BclAssembly Include="System.Xml.Serialization.dll"/>
54+
</ItemGroup>
55+
<ItemGroup>
56+
<_BclProfileItems Include="@(_BclAssembly->'$(_MonoProfileDir)\%(Identity)')" />
57+
</ItemGroup>
58+
<ItemGroup>
59+
<_BclInstalledItem Include="@(_BclAssembly->'$(OutputPath)lib\xbuild-frameworks\MonoAndroid\v1.0\%(Identity)')" />
60+
</ItemGroup>
1261
<Target Name="_SetAutogenShTimeToLastCommitTimestamp">
1362
<Exec
1463
Command="touch -m -t `git log -1 --format=%25cd --date=format-local:%25Y%25m%25d%25H%25M.%25S` autogen.sh"
@@ -39,7 +88,7 @@
3988
</Target>
4089
<Target Name="_BuildRuntimes"
4190
Inputs="@(_MonoRuntime->'$(IntermediateOutputPath)%(Identity)\.stamp')"
42-
Outputs="@(_MonoRuntime->'$(IntermediateOutputPath)%(Identity)\mono\mini\.libs\%(OutputRuntime)');@(_MonoRuntime->'$(IntermediateOutputPath)%(Identity)\mono\profiler\.libs\%(OutputProfiler)');@(_MonoRuntime->'$(IntermediateOutputPath)%(Identity)\support\.libs\%(OutputMonoPosixHelper)')">
91+
Outputs="@(_MonoRuntime->'$(IntermediateOutputPath)%(Identity)\mono\mini\.libs\%(OutputRuntime)');@(_MonoRuntime->'$(IntermediateOutputPath)%(Identity)\mono\profiler\.libs\%(OutputProfiler)');@(_MonoRuntime->'$(IntermediateOutputPath)%(Identity)\support\.libs\%(OutputMonoPosixHelper)');@(_BclProfileItems)">
4392
<Exec
4493
Command="make $(MAKEFLAGS) # %(_MonoRuntime.Identity)"
4594
WorkingDirectory="@(_MonoRuntime->'$(IntermediateOutputPath)\%(Identity)')"
@@ -82,8 +131,8 @@
82131
/>
83132
</Target>
84133
<Target Name="_InstallBcl"
85-
Inputs="$(_MonoPath)\mcs\class\lib\monodroid\mscorlib.dll"
86-
Outputs="$(OutputPath)lib\xbuild-frameworks\MonoAndroid\v1.0\mscorlib.dll;$(OutputPath)lib\xbuild-frameworks\MonoAndroid\v1.0\RedistList\FrameworkList.xml">
134+
Inputs="@(_BclProfileItems)"
135+
Outputs="@(_BclInstalledItem);$(OutputPath)lib\xbuild-frameworks\MonoAndroid\v1.0\RedistList\FrameworkList.xml">
87136
<MakeDir Directories="$(_BclFrameworkDir)" />
88137
<MakeDir Directories="$(_BclFrameworkDir)\RedistList" />
89138
<MakeDir Directories="$(_BclFrameworkDir)\Facades" />
@@ -95,8 +144,8 @@
95144
</GetNugetPackageBasePath>
96145
<ItemGroup>
97146
<_FSharp Include="$(_SourceTopDir)\$(_FSharpCorePackagePath)\lib\portable-net45+monoandroid10+monotouch10+xamarinios10\FSharp.Core*" />
98-
<_Assemblies Include="$(_MonoPath)\mcs\class\lib\monodroid\*.dll" />
99-
<_Facades Include="$(_MonoPath)\mcs\class\lib\monodroid\Facades\*.dll" />
147+
<_Assemblies Include="$(_MonoProfileDir)\*.dll" />
148+
<_Facades Include="$(_MonoProfileDir)\Facades\*.dll" />
100149
</ItemGroup>
101150
<Copy
102151
SourceFiles="@(_Assemblies)"

0 commit comments

Comments
 (0)