Skip to content

Commit b6e8073

Browse files
authored
Work around for Android builds using GCC for cross compiler native tools build (#88345)
* Work around for Android builds using GCC for cross compiler native tools build * Allow true cross-compiled cross-compiler during Android repo builds
1 parent 50af35c commit b6e8073

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

eng/native/build-commons.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ build_native()
7878
cmakeArgs="-DCMAKE_SYSTEM_VARIANT=maccatalyst $cmakeArgs"
7979
fi
8080

81-
if [[ ( "$targetOS" == android || "$targetOS" == linux-bionic ) && -z "$ROOTFS_DIR" ]]; then
81+
if [[ "$targetOS" == android || "$targetOS" == linux-bionic ]]; then
8282
if [[ -z "$ANDROID_NDK_ROOT" ]]; then
8383
echo "Error: You need to set the ANDROID_NDK_ROOT environment variable pointing to the Android NDK root."
8484
exit 1

eng/pipelines/common/templates/pipeline-with-resources.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ resources:
3636

3737
# This container contains all required toolsets to build for Android and for Linux with bionic libc.
3838
- container: linux_bionic
39-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-android
39+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-android-amd64
4040

4141
# This container contains all required toolsets to build for Android as well as tooling to build docker images.
4242
- container: android_docker

src/mono/mono.proj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@
772772

773773
<!-- Android specific options -->
774774
<PropertyGroup Condition="'$(TargetsAndroid)' == 'true' or '$(TargetsLinuxBionic)' == 'true'">
775-
<_MonoSkipInitCompiler>true</_MonoSkipInitCompiler>
775+
<_MonoSkipInitCompiler>false</_MonoSkipInitCompiler>
776776

777777
<MonoUseCrossTool>true</MonoUseCrossTool>
778778
<MonoAotCMakeSysroot Condition="Exists('$(ANDROID_NDK_ROOT)/sysroot')">$(ANDROID_NDK_ROOT)/sysroot</MonoAotCMakeSysroot>

0 commit comments

Comments
 (0)