Skip to content

Commit d4012bc

Browse files
committed
Limit CoreCLR builds to android-arm64 for now
1 parent 915c0db commit d4012bc

File tree

3 files changed

+38
-29
lines changed

3 files changed

+38
-29
lines changed

Configuration.props

+5
Original file line numberDiff line numberDiff line change
@@ -220,4 +220,9 @@
220220
<AndroidAbiAndRuntimeFlavor Include="@(AndroidSupportedTargetJitAbi)" AndroidRuntime="NativeAOT" />
221221
<AndroidAbiAndRuntimeFlavor Include="@(AndroidSupportedTargetJitAbi)" AndroidRuntime="CoreCLR" />
222222
</ItemGroup>
223+
224+
<!-- TEMPORARY: to be removed once this PR is ready to be merged -->
225+
<PropertyGroup>
226+
<_LocalClrDirectory>$(AndroidToolchainDirectory)\clr</_LocalClrDirectory>
227+
</PropertyGroup>
223228
</Project>

src/native/native-clr.csproj

+4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
77
<OutputType>Exe</OutputType>
88
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
9+
10+
<!-- HACK HACK: until CoreCLR exists for all the targets, work only with arm64 -->
11+
<AndroidSupportedTargetAotAbis>arm64</AndroidSupportedTargetAotAbis>
12+
<AndroidSupportedTargetJitAbis>arm64-v8a</AndroidSupportedTargetJitAbis>
913
</PropertyGroup>
1014

1115
<Import Project="..\..\Configuration.props" />

src/native/native.targets

+29-29
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
<UsingTask AssemblyFile="$(BootstrapTasksAssembly)" TaskName="Xamarin.Android.Tools.BootstrapTasks.RunParallelCmds" />
44

55
<Target Name="_PrepareCommonProperties">
6-
<PropertyGroup>
7-
<FlavorIntermediateOutputPath>$(IntermediateOutputPath)\$(CMakeRuntimeFlavor)\</FlavorIntermediateOutputPath>
8-
</PropertyGroup>
6+
<PropertyGroup>
7+
<FlavorIntermediateOutputPath>$(IntermediateOutputPath)\$(CMakeRuntimeFlavor)\</FlavorIntermediateOutputPath>
8+
</PropertyGroup>
99
</Target>
1010

1111
<Target Name="_BuildRuntimes" BeforeTargets="Build"
@@ -30,17 +30,17 @@
3030

3131
<Target Name="_ConfigureRuntimesInputs">
3232
<ItemGroup>
33-
<_ConfigureRuntimesInputs Include="..\..\build-tools\scripts\Ndk.targets" />
34-
<_ConfigureRuntimesInputs Include="CMakeLists.txt" />
33+
<_ConfigureRuntimesInputs Include="..\..\build-tools\scripts\Ndk.targets" />
34+
<_ConfigureRuntimesInputs Include="CMakeLists.txt" />
3535
<_ConfigureRuntimesInputs Include="common\java-interop\CMakeLists.txt" />
3636
<_ConfigureRuntimesInputs Include="common\libstub\CMakeLists.txt" />
3737
<_ConfigureRuntimesInputs Include="common\libunwind\CMakeLists.txt" />
3838
<_ConfigureRuntimesInputs Include="common\lz4\CMakeLists.txt" />
3939

40-
<_ConfigureRuntimesOutputs Include="@(AndroidSupportedTargetJitAbi->'$(FlavorIntermediateOutputPath)\%(AndroidRID)-Debug\CMakeCache.txt')" />
40+
<_ConfigureRuntimesOutputs Include="@(AndroidSupportedTargetJitAbi->'$(FlavorIntermediateOutputPath)\%(AndroidRID)-Debug\CMakeCache.txt')" />
4141
<_ConfigureRuntimesOutputs Include="@(AndroidSupportedTargetJitAbi->'$(FlavorIntermediateOutputPath)\%(AndroidRID)-Release\CMakeCache.txt')" />
4242

43-
<_OutputDirsToCreate Include="$(FlavorIntermediateOutputPath)\%(AndroidSupportedTargetJitAbi.AndroidRID)-Debug" />
43+
<_OutputDirsToCreate Include="$(FlavorIntermediateOutputPath)\%(AndroidSupportedTargetJitAbi.AndroidRID)-Debug" />
4444
<_OutputDirsToCreate Include="$(FlavorIntermediateOutputPath)\%(AndroidSupportedTargetJitAbi.AndroidRID)-Release" />
4545
</ItemGroup>
4646

@@ -64,13 +64,13 @@
6464
<_OutputDirsToCreate Include="$(FlavorIntermediateOutputPath)\%(AndroidSupportedTargetJitAbi.AndroidRID)-ubsan-Release" Condition="'$(EnableNativeAnalyzers)' == 'true'" />
6565
</ItemGroup>
6666

67-
<ItemGroup Condition=" '$(CMakeRuntimeFlavor)' == 'CoreCLR' ">
68-
<_ConfigureRuntimesInputs Include="clr\host\CMakeLists.txt" />
69-
<_ConfigureRuntimesInputs Include="clr\runtime-base\CMakeLists.txt" />
70-
<_ConfigureRuntimesInputs Include="clr\shared\CMakeLists.txt" />
71-
<_ConfigureRuntimesInputs Include="clr\startup\CMakeLists.txt" />
72-
<_ConfigureRuntimesInputs Include="clr\xamarin-app-stub\CMakeLists.txt" />
73-
</ItemGroup>
67+
<ItemGroup Condition=" '$(CMakeRuntimeFlavor)' == 'CoreCLR' ">
68+
<_ConfigureRuntimesInputs Include="clr\host\CMakeLists.txt" />
69+
<_ConfigureRuntimesInputs Include="clr\runtime-base\CMakeLists.txt" />
70+
<_ConfigureRuntimesInputs Include="clr\shared\CMakeLists.txt" />
71+
<_ConfigureRuntimesInputs Include="clr\startup\CMakeLists.txt" />
72+
<_ConfigureRuntimesInputs Include="clr\xamarin-app-stub\CMakeLists.txt" />
73+
</ItemGroup>
7474
</Target>
7575

7676
<Target Name="_ConfigureArchiveDSOInputsAndOutputs">
@@ -163,12 +163,12 @@
163163

164164
<!-- TODO: update for the changes -->
165165
<Target Name="_FindRuntimeSources">
166-
<ItemGroup>
167-
<_RuntimeSources Include="$(JavaInteropFullPath)\src\java-interop\*.cc;$(JavaInteropFullPath)\src\java-interop\*.h" />
168-
<_RuntimeSources Include="common\archive-dso-stub\*.cc" />
169-
<_RuntimeSources Include="common\libstub\*.cc;common\libstub\*.hh" />
166+
<ItemGroup>
167+
<_RuntimeSources Include="$(JavaInteropFullPath)\src\java-interop\*.cc;$(JavaInteropFullPath)\src\java-interop\*.h" />
168+
<_RuntimeSources Include="common\archive-dso-stub\*.cc" />
169+
<_RuntimeSources Include="common\libstub\*.cc;common\libstub\*.hh" />
170170
<_RuntimeSources Include="$(LZ4SourceFullPath)\lib\lz4.c;$(LZ4SourceFullPath)\lib\lz4.h" />
171-
</ItemGroup>
171+
</ItemGroup>
172172

173173
<ItemGroup Condition=" '$(CMakeRuntimeFlavor)' == 'MonoVM' ">
174174
<_RuntimeSources Include="mono\monodroid\*.cc;mono\monodroid\*.hh" />
@@ -179,27 +179,27 @@
179179
<_RuntimeSources Include="mono\xamarin-debug-app-helper\*.cc;mono\xamarin-debug-app-helper\*.hh" />
180180
</ItemGroup>
181181

182-
<ItemGroup Condition=" '$(CMakeRuntimeFlavor)' == 'CoreCLR' ">
183-
<_RuntimeSources Include="clr\host\*.cc;clr\host\*.hh" />
184-
<_RuntimeSources Include="clr\include\**\*.hh" />
185-
<_RuntimeSources Include="clr\startup\*.cc;clr\startup\*.hh" />
186-
<_RuntimeSources Include="clr\xamarin-app-stub\*.cc;clr\xamarin-app-stub\*.hh" />
182+
<ItemGroup Condition=" '$(CMakeRuntimeFlavor)' == 'CoreCLR' ">
183+
<_RuntimeSources Include="clr\host\*.cc;clr\host\*.hh" />
184+
<_RuntimeSources Include="clr\include\**\*.hh" />
185+
<_RuntimeSources Include="clr\startup\*.cc;clr\startup\*.hh" />
186+
<_RuntimeSources Include="clr\xamarin-app-stub\*.cc;clr\xamarin-app-stub\*.hh" />
187187
<_RuntimeSources Include="clr\runtime-base\*.cc;clr\runtime-base\*.hh" />
188188
<_RuntimeSources Include="clr\shared\*.cc;clr\shared\*.hh" />
189-
</ItemGroup>
189+
</ItemGroup>
190190
</Target>
191191

192192
<Target Name="_BuildAndroidRuntimesInputs"
193193
DependsOnTargets="_FindRuntimeSources">
194-
<ItemGroup>
195-
<_BuildAndroidRuntimesInputs Include="@(AndroidSupportedTargetJitAbi->'$(FlavorIntermediateOutputPath)\%(AndroidRID)-Debug\CMakeCache.txt')" />
194+
<ItemGroup>
195+
<_BuildAndroidRuntimesInputs Include="@(AndroidSupportedTargetJitAbi->'$(FlavorIntermediateOutputPath)\%(AndroidRID)-Debug\CMakeCache.txt')" />
196196
<_BuildAndroidRuntimesInputs Include="@(AndroidSupportedTargetJitAbi->'$(FlavorIntermediateOutputPath)\%(AndroidRID)-Release\CMakeCache.txt')" />
197197
<_BuildAndroidRuntimesInputs Include="@(_RuntimeSources)" />
198-
<_BuildAndroidRuntimesInputs Include="..\..\build-tools\scripts\Ndk.targets" />
198+
<_BuildAndroidRuntimesInputs Include="..\..\build-tools\scripts\Ndk.targets" />
199199

200200
<_BuildAndroidRuntimesOutputs Include="@(AndroidSupportedTargetJitAbi->'$(OutputPath)\%(AndroidRID)\Debug\libxamarin-app.so')" />
201201
<_BuildAndroidRuntimesOutputs Include="@(AndroidSupportedTargetJitAbi->'$(OutputPath)\%(AndroidRID)\Release\libxamarin-app.so')" />
202-
</ItemGroup>
202+
</ItemGroup>
203203

204204
<ItemGroup Condition=" '$(CMakeRuntimeFlavor)' == 'MonoVM' ">
205205
<_BuildAndroidRuntimesOutputs Include="@(AndroidSupportedTargetJitAbi->'$(OutputPath)\%(AndroidRID)\libmono-android.debug.so')" />

0 commit comments

Comments
 (0)