Bug 1400128 - Link thumb library of libc++ when using MOZ_THUMB=1 and NDK r11c. r=froydnj
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Fri, 15 Sep 2017 13:40:43 +0900
changeset 381355 faa897d7948b7e2439573f39c34366c138913663
parent 381354 be5bddf32db0a1ed27251295b7711d06f9189b11
child 381356 80494b13f4928660229d6c39d409cc4094a6b35a
child 381360 92224fd4468ac84b2193a97f0ac61288ad86d2df
child 381370 1edc0d159982f6befa8c6e38f8af7e1f39c73e92
push id32522
push userarchaeopteryx@coole-files.de
push dateSun, 17 Sep 2017 09:40:19 +0000
treeherdermozilla-central@faa897d7948b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1400128, 1
milestone57.0a1
first release with
nightly linux32
faa897d7948b / 57.0a1 / 20170917100334 / files
nightly linux64
faa897d7948b / 57.0a1 / 20170917100334 / files
nightly mac
faa897d7948b / 57.0a1 / 20170917100334 / files
nightly win32
faa897d7948b / 57.0a1 / 20170917100334 / files
nightly win64
faa897d7948b / 57.0a1 / 20170917100334 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1400128 - Link thumb library of libc++ when using MOZ_THUMB=1 and NDK r11c. r=froydnj cpu_arch_dir isn't absolute path, we cannot always detect thumb library for c++ library. Our build tool still uses NDK r11c, so we should check thumb library correctly. MozReview-Commit-ID: 912ZDNeUcKc
build/autoconf/android.m4
--- a/build/autoconf/android.m4
+++ b/build/autoconf/android.m4
@@ -58,44 +58,48 @@ if test "$OS_TARGET" = "Android"; then
     AC_SUBST(ANDROID_CPU_ARCH)
 fi
 ])
 
 AC_DEFUN([MOZ_ANDROID_STLPORT],
 [
 
 if test "$OS_TARGET" = "Android"; then
-    cpu_arch_dir="$ANDROID_CPU_ARCH"
-    # NDK r12 removed the arm/thumb library split and just made everything
-    # thumb by default.  Attempt to compensate.
-    if test "$MOZ_THUMB2" = 1 -a -d "$cpu_arch_dir/thumb"; then
-        cpu_arch_dir="$cpu_arch_dir/thumb"
-    fi
-
     if test -z "$STLPORT_CPPFLAGS$STLPORT_LIBS"; then
         case "$android_cxx_stl" in
         libstdc++)
             # android-ndk-r8b and later
             ndk_base="$android_ndk/sources/cxx-stl/gnu-libstdc++/$android_gnu_compiler_version"
             ndk_libs_include="$ndk_base/libs/$ANDROID_CPU_ARCH"
-            ndk_libs="$ndk_base/libs/$cpu_arch_dir"
+            # NDK r12 removed the arm/thumb library split and just made
+            # everything thumb by default.  Attempt to compensate.
+            if test "$MOZ_THUMB2" = 1 -a -d "$ndk_libs_include/thumb"; then
+                ndk_libs="$ndk_libs_include/thumb"
+            else
+                ndk_libs="$ndk_libs_include"
+            fi
             ndk_include="$ndk_base/include"
 
             if ! test -e "$ndk_libs/libgnustl_static.a"; then
                 AC_MSG_ERROR([Couldn't find path to gnu-libstdc++ in the android ndk])
             fi
 
             STLPORT_LIBS="-L$ndk_libs -lgnustl_static"
             STLPORT_CPPFLAGS="-I$ndk_include -I$ndk_include/backward -I$ndk_libs_include/include"
             ;;
         libc++)
             # android-ndk-r8b and later
             ndk_base="$android_ndk/sources/cxx-stl"
             cxx_base="$ndk_base/llvm-libc++"
-            cxx_libs="$cxx_base/libs/$cpu_arch_dir"
+            cxx_libs="$cxx_base/libs/$ANDROID_CPU_ARCH"
+            # NDK r12 removed the arm/thumb library split and just made
+            # everything thumb by default.  Attempt to compensate.
+            if test "$MOZ_THUMB2" = 1 -a -d "$cxx_libs/thumb"; then
+                cxx_libs="$cxx_libs/thumb"
+            fi
             cxx_include="$cxx_base/libcxx/include"
             cxxabi_base="$ndk_base/llvm-libc++abi"
             cxxabi_include="$cxxabi_base/libcxxabi/include"
 
             if ! test -e "$cxx_libs/libc++_static.a"; then
                 AC_MSG_ERROR([Couldn't find path to llvm-libc++ in the android ndk])
             fi