Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work around for Android builds using GCC for cross compiler native tools build #88345

Merged
merged 11 commits into from
Jul 10, 2023
2 changes: 1 addition & 1 deletion eng/native/build-commons.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ build_native()
cmakeArgs="-DCMAKE_SYSTEM_VARIANT=maccatalyst $cmakeArgs"
fi

if [[ ( "$targetOS" == android || "$targetOS" == linux-bionic ) && -z "$ROOTFS_DIR" ]]; then
if [[ "$targetOS" == android || "$targetOS" == linux-bionic ]]; then
if [[ -z "$ANDROID_NDK_ROOT" ]]; then
echo "Error: You need to set the ANDROID_NDK_ROOT environment variable pointing to the Android NDK root."
exit 1
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/common/templates/pipeline-with-resources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ resources:

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

# This container contains all required toolsets to build for Android as well as tooling to build docker images.
- container: android_docker
Expand Down
2 changes: 1 addition & 1 deletion src/mono/mono.proj
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@

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

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