Skip to content

Commit

Permalink
[android] Fix build with newer NDK (#103233)
Browse files Browse the repository at this point in the history
Newer versions of Android NDK (tested with 26.3) no longer include
support for 32-bit host machines and have moved libraries around for
that reason.  One of the libraries that changed its location is
`libclang.so`, required to build MonoVM for Android.

This PR adds support to detect the library at its new location.
  • Loading branch information
grendello authored Jun 12, 2024
1 parent 1a5cdb4 commit f690a1a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/mono/mono.proj
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,8 @@ JS_ENGINES = [NODE_JS]

<!-- Linux specific options -->
<ItemGroup Condition="'$(AotHostOS)' == 'linux'">
<_LibClang Include="$(ANDROID_NDK_ROOT)/toolchains/llvm/prebuilt/$(MonoToolchainPrebuiltOS)/lib64/libclang.so.*"/>
<_LibClang Include="$(ANDROID_NDK_ROOT)/toolchains/llvm/prebuilt/$(MonoToolchainPrebuiltOS)/lib/libclang.so" Condition=" Exists('$(ANDROID_NDK_ROOT)/toolchains/llvm/prebuilt/$(MonoToolchainPrebuiltOS)/lib/libclang.so') "/>
<_LibClang Include="$(ANDROID_NDK_ROOT)/toolchains/llvm/prebuilt/$(MonoToolchainPrebuiltOS)/lib64/libclang.so.*" Condition=" '$(_LibClang)' == '' "/>
</ItemGroup>
<PropertyGroup Condition="'$(TargetsLinux)' == 'true' and '$(Platform)' == 'arm64'">
<MonoUseCrossTool>true</MonoUseCrossTool>
Expand Down

0 comments on commit f690a1a

Please sign in to comment.