Bug 1437201 - Part 0: Use toolchain clang for host compiler on Android. r=froydnj draft
authorNick Alexander <nalexander@mozilla.com>
Tue, 13 Feb 2018 10:32:18 -0800
changeset 754566 cdd73c729a063507b841297520cafb8d20a8dc65
parent 754399 38b3c1d03a594664c6b32c35533734283c258f43
child 754567 3716d4ff7ce2f1e796489e02e312d7554a5b1e6c
push id98924
push usernalexander@mozilla.com
push dateTue, 13 Feb 2018 20:18:37 +0000
reviewersfroydnj
bugs1437201
milestone60.0a1
Bug 1437201 - Part 0: Use toolchain clang for host compiler on Android. r=froydnj MozReview-Commit-ID: DgwfKbjEuIq
mobile/android/config/mozconfigs/common
--- 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"