Bug 1437201 - Part 0: Use toolchain clang for host compiler on Android. r=froydnj
MozReview-Commit-ID: DgwfKbjEuIq
--- a/mobile/android/config/mozconfigs/common
+++ b/mobile/android/config/mozconfigs/common
@@ -5,38 +5,21 @@
# This file is included at the top of all native android mozconfigs
if [ -z "$NO_NDK" ]; then
. "$topsrcdir/build/mozconfig.stylo"
fi
MOZ_AUTOMATION_L10N_CHECK=0
. "$topsrcdir/build/mozconfig.common"
-# For actual Android builds in TaskCluster, the system image is Debian,
-# and we use the Java JRE/JDK from the system, as well as the system
-# GCC for the host compiler. l10n builds are still special, however:
-# they are run on older CentOS systems, and l10n builds on release are
-# still run on Buildbot. So we have to set things up so this mozconfig
-# works in all cases.
-if [ -f /etc/debian_version ]; then
- # We're on Debian, there's nothing to do.
- true
-elif [ ! -f /etc/redhat-release ] || [ "$(< /etc/redhat-release)" != "CentOS release 6.2 (Final)" ]; then
- # set JAVA_HOME to find the JRE/JDK from tooltool. Several scripts in the JDK
- # assume `java` is in PATH, so set that too. To see how this tarball is built,
- # see taskcluster/scripts/builder/build-android-dependencies/repackage-jdk-centos.sh
- export JAVA_HOME="$topsrcdir/java_home"
- export PATH="$PATH:$topsrcdir/java_home/bin"
-
- mk_add_options "export JAVA_HOME=$topsrcdir/java_home"
- mk_add_options "export PATH=$PATH:$topsrcdir/java_home/bin"
-
- HOST_CC="$topsrcdir/gcc/bin/gcc"
- HOST_CXX="$topsrcdir/gcc/bin/g++"
-fi
+# For Android builds in TaskCluster, the system image is Debian, and
+# we use the Java JRE/JDK from the system. We use a custom clang for
+# the host compiler.
+HOST_CC="$topsrcdir/clang/bin/clang"
+HOST_CXX="$topsrcdir/clang/bin/clang++"
# Build Fennec
ac_add_options --enable-application=mobile/android
ac_add_options --with-android-sdk="$topsrcdir/android-sdk-linux"
ac_add_options --with-gradle="$topsrcdir/android-gradle-dependencies/gradle-dist/bin/gradle"
export GRADLE_MAVEN_REPOSITORIES="file://$topsrcdir/android-gradle-dependencies/jcenter","file://$topsrcdir/android-gradle-dependencies/google"