Bug 1411802 - Fix bustage after updating NDK r15c. r=me
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Sun, 29 Oct 2017 14:02:09 +0900
changeset 388901 1e4f10cea5e7
parent 388900 c1c3b82079a5
child 388902 b5e3d2b21ac7
child 388937 1e4d6c984772
push id96733
push userm_kato@ga2.so-net.ne.jp
push dateSun, 29 Oct 2017 13:59:20 +0000
treeherdermozilla-inbound@1e4f10cea5e7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1411802
milestone58.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1411802 - Fix bustage after updating NDK r15c. r=me MozReview-Commit-ID: 2kMieFmFWsJ
build/moz.configure/android-ndk.configure
--- a/build/moz.configure/android-ndk.configure
+++ b/build/moz.configure/android-ndk.configure
@@ -254,23 +254,27 @@ def stlport_cppflags(value, ndk, _):
                                cxxabi_include)
 
 
 add_old_configure_assignment('stlport_cppflags', stlport_cppflags)
 
 
 @depends(stlport_cppflags, android_platform, android_toolchain,
          android_toolchain_prefix_base, '--help')
+@imports(_from='os.path', _import='isdir')
 def bindgen_cflags_defaults(stlport_cppflags, android_platform, toolchain,
                             toolchain_prefix, _):
     if not stlport_cppflags:
         return
 
     gcc_include = os.path.join(
-        toolchain, 'lib', 'gcc', toolchain_prefix, '4.9')
+        toolchain, 'lib', 'gcc', toolchain_prefix, '4.9.x')
+    if not isdir(gcc_include):
+        gcc_include = os.path.join(
+            toolchain, 'lib', 'gcc', toolchain_prefix, '4.9')
 
     cflags_format = "%s -isystem %s -gcc-toolchain %s -I%s -I%s"
     return cflags_format % (stlport_cppflags,
                             os.path.join(android_platform, 'usr', 'include'),
                             toolchain,
                             os.path.join(gcc_include, 'include'),
                             os.path.join(gcc_include, 'include-fixed'))