Bug 1412983 - part 4 - make extra_toolchain_flags depend on stlport_cppflags; r=ted.mielczarek
authorNathan Froyd <froydnj@mozilla.com>
Wed, 15 Nov 2017 10:12:22 -0500
changeset 391923 9615a90cf9b030ea72fdc1dd0f42bfa2348aae68
parent 391922 776266640ecada42623596ad6ef5c0b203eaae2e
child 391924 0e6f349c815e0424ede297c7269914330ad986a5
push id97367
push usernfroyd@mozilla.com
push dateWed, 15 Nov 2017 15:12:44 +0000
treeherdermozilla-inbound@b0eedb4c140b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted.mielczarek
bugs1412983
milestone59.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 1412983 - part 4 - make extra_toolchain_flags depend on stlport_cppflags; r=ted.mielczarek extra_toolchain_flags is used for compiling target-specific bits of code elsewhere in configure. Very shortly, we'll need to compile bits of code that depend on the C++ standard library, so we'll want to point the compiler at the C++ standard library. Making extra_toolchain_flags include stlport_cppflags is the best way to do that.
build/moz.configure/android-ndk.configure
--- a/build/moz.configure/android-ndk.configure
+++ b/build/moz.configure/android-ndk.configure
@@ -236,24 +236,26 @@ def stlport_cppflags(value, ndk, _):
         '-I%s' % cxx_include,
         '-I%s' % os.path.join(ndk, 'sources', 'android', 'support', 'include'),
         '-I%s' % cxxabi_include]
 
 
 add_old_configure_assignment('stlport_cppflags', stlport_cppflags)
 
 
-@depends(android_platform, android_toolchain)
-def extra_toolchain_flags(platform_dir, toolchain_dir):
+@depends(android_platform, android_toolchain, stlport_cppflags)
+def extra_toolchain_flags(platform_dir, toolchain_dir, stlport_cppflags):
     if not platform_dir:
         return []
-    return ['-isystem',
-            os.path.join(platform_dir, 'usr', 'include'),
-            '-gcc-toolchain',
-            toolchain_dir]
+    flags = ['-isystem',
+             os.path.join(platform_dir, 'usr', 'include'),
+             '-gcc-toolchain',
+             toolchain_dir]
+    flags.extend(stlport_cppflags if stlport_cppflags else [])
+    return flags
 
 
 @depends(android_toolchain_prefix_base, android_toolchain)
 def android_toolchain_prefix(prefix_base, toolchain):
     if toolchain:
         return '%s/bin/%s-' % (toolchain, prefix_base)