Skip to content

Commit 742e031

Browse files
jonpryoratsushieno
authored andcommitted
[monodroid] Fix builds when $(AndroidSupportedAbis) contains host (#58)
Commit 0c073f6 broke the src/monodroid build: src/monodroid/monodroid.targets: error : Cannot copy .../xamarin-android/src/monodroid/obj/local/host-Darwin/libmonodroid.so to .../xamarin-android/bin/Debug/lib/xbuild/Xamarin/Android/lib/host-Darwin/libmono-android.debug.d.so, as the source file doesn't exist. This is because with 0c073f6, `$(AndroidSupportedAbis)` now contains e.g. host-Darwin, which isn't a valid ABI name as far as `ndk-build` is concerned. Fix the src/monodroid build by excluding non-Android values.
1 parent d9136d5 commit 742e031

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

Diff for: Configuration.props

+5
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@
2626
<PropertyGroup>
2727
<AndroidMxeFullPath>$([System.IO.Path]::GetFullPath ('$(AndroidMxeInstallPrefix)'))</AndroidMxeFullPath>
2828
</PropertyGroup>
29+
<ItemGroup>
30+
<HostOSName Include="host-Darwin" />
31+
<HostOSName Include="host-Linux" />
32+
<HostOSName Include="host-win64" />
33+
</ItemGroup>
2934
<!--
3035
"Fixup" $(AndroidSupportedAbis) so that Condition attributes elsewhere
3136
can use `:ABI-NAME:`, to avoid substring mismatches.

Diff for: src/monodroid/monodroid.projitems

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<_SupportedAbis>$(AndroidSupportedAbis.Replace(':', ';'))</_SupportedAbis>
55
</PropertyGroup>
66
<ItemGroup>
7-
<_MonoRuntime Include="$(_SupportedAbis)" />
7+
<_MonoRuntime Include="$(_SupportedAbis)" Exclude="@(HostOSName)" />
88
</ItemGroup>
99
<ItemGroup>
1010
<_RequiredProgram Include="xxd" />

Diff for: src/monodroid/monodroid.targets

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
Outputs="@(_MonoRuntime->'$(OutputPath)\%(Identity)\libmono-android.$(_Conf).so')">
1414
<Which Program="%(_RequiredProgram.Identity)" Required="True" />
1515
<PropertyGroup>
16-
<_AppAbi>$(AndroidSupportedAbis.Replace(':', ' '))</_AppAbi>
16+
<_AppAbi>@(_MonoRuntime->'%(Identity)', ' ')</_AppAbi>
1717
</PropertyGroup>
1818
<WriteLinesToFile
1919
File="jni\Application.mk"

0 commit comments

Comments
 (0)