Skip to content

Commit f690a1a

Browse files
authored
[android] Fix build with newer NDK (#103233)
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.
1 parent 1a5cdb4 commit f690a1a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/mono/mono.proj

+2-1
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,8 @@ JS_ENGINES = [NODE_JS]
806806

807807
<!-- Linux specific options -->
808808
<ItemGroup Condition="'$(AotHostOS)' == 'linux'">
809-
<_LibClang Include="$(ANDROID_NDK_ROOT)/toolchains/llvm/prebuilt/$(MonoToolchainPrebuiltOS)/lib64/libclang.so.*"/>
809+
<_LibClang Include="$(ANDROID_NDK_ROOT)/toolchains/llvm/prebuilt/$(MonoToolchainPrebuiltOS)/lib/libclang.so" Condition=" Exists('$(ANDROID_NDK_ROOT)/toolchains/llvm/prebuilt/$(MonoToolchainPrebuiltOS)/lib/libclang.so') "/>
810+
<_LibClang Include="$(ANDROID_NDK_ROOT)/toolchains/llvm/prebuilt/$(MonoToolchainPrebuiltOS)/lib64/libclang.so.*" Condition=" '$(_LibClang)' == '' "/>
810811
</ItemGroup>
811812
<PropertyGroup Condition="'$(TargetsLinux)' == 'true' and '$(Platform)' == 'arm64'">
812813
<MonoUseCrossTool>true</MonoUseCrossTool>

0 commit comments

Comments
 (0)