Bug 1412983 - part 1 - convert stlport_cppflags to return a list; r=ted.mielczarek
authorNathan Froyd <froydnj@mozilla.com>
Wed, 15 Nov 2017 10:12:23 -0500
changeset 391920 90e7ff50c118399cb70f269bcab8f2cc798c0b30
parent 391919 7137557138c4283ff790e4e696aa7d821ca7c0ed
child 391921 0fb376428333495e7958c16c1ad4a977aef4f7d2
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 1 - convert stlport_cppflags to return a list; r=ted.mielczarek A list is a better format for these options, and we'll want a list later when we use the options as compilation flags.
build/moz.configure/android-ndk.configure
--- a/build/moz.configure/android-ndk.configure
+++ b/build/moz.configure/android-ndk.configure
@@ -221,17 +221,17 @@ option(env='STLPORT_CPPFLAGS',
        nargs=1,
        help='Options compiler should pass for standard C++ library')
 
 
 @depends('STLPORT_CPPFLAGS', ndk, '--help')
 @imports(_from='os.path', _import='isdir')
 def stlport_cppflags(value, ndk, _):
     if value and len(value):
-        return value
+        return value.split()
     if not ndk:
         return
 
     ndk_base = os.path.join(ndk, 'sources', 'cxx-stl')
     cxx_base = os.path.join(ndk_base, 'llvm-libc++')
     cxx_include = os.path.join(cxx_base, 'libcxx', 'include')
     cxxabi_base = os.path.join(ndk_base, 'llvm-libc++abi')
     cxxabi_include = os.path.join(cxxabi_base, 'libcxxabi', 'include')
@@ -246,20 +246,20 @@ def stlport_cppflags(value, ndk, _):
         # NDK r13 removes the inner "libcxxabi" directory.
         cxxabi_include = os.path.join(cxxabi_base, 'include')
         if not isdir(cxxabi_include):
             die("Couldn't find path to libc++abi includes in the android ndk")
 
     # Add android/support/include/ for prototyping long double math
     # functions, locale-specific C library functions, multibyte support,
     # etc.
-    return "-I%s -I%s -I%s" % (cxx_include,
-                               os.path.join(ndk, 'sources', 'android',
-                                            'support', 'include'),
-                               cxxabi_include)
+    return [
+        '-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(stlport_cppflags, android_platform, android_toolchain,
          android_toolchain_prefix_base, '--help')
 @imports(_from='os.path', _import='isdir')
@@ -270,17 +270,17 @@ def bindgen_cflags_defaults(stlport_cppf
 
     gcc_include = os.path.join(
         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,
+    return cflags_format % (' '.join(stlport_cppflags),
                             os.path.join(android_platform, 'usr', 'include'),
                             toolchain,
                             os.path.join(gcc_include, 'include'),
                             os.path.join(gcc_include, 'include-fixed'))
 
 
 @depends(host, ndk)
 @imports(_from='os.path', _import='exists')