Skip to content

Commit

Permalink
Bug 1412983 - part 2 - use extra_toolchain_flags for computing bindge…
Browse files Browse the repository at this point in the history
…n flags; r=ted.mielczarek

We compute the same set of data in extra_toolchain_flags as we were
computing in bindgen_cflags_defaults.  We might as well reuse the former
to compute the latter.
  • Loading branch information
froydnj committed Nov 15, 2017
1 parent d90b995 commit f94f128
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions build/moz.configure/android-ndk.configure
Original file line number Diff line number Diff line change
Expand Up @@ -260,11 +260,11 @@ def stlport_cppflags(value, ndk, _):
add_old_configure_assignment('stlport_cppflags', stlport_cppflags)


@depends(stlport_cppflags, android_platform, android_toolchain,
@depends(stlport_cppflags, extra_toolchain_flags, android_toolchain,
android_toolchain_prefix_base, '--help')
@imports(_from='os.path', _import='isdir')
def bindgen_cflags_defaults(stlport_cppflags, android_platform, toolchain,
toolchain_prefix, _):
def bindgen_cflags_defaults(stlport_cppflags, toolchain_flags,
toolchain, toolchain_prefix, _):
if not stlport_cppflags:
return

Expand All @@ -274,10 +274,9 @@ def bindgen_cflags_defaults(stlport_cppflags, android_platform, toolchain,
gcc_include = os.path.join(
toolchain, 'lib', 'gcc', toolchain_prefix, '4.9')

cflags_format = "%s -isystem %s -gcc-toolchain %s -I%s -I%s"
cflags_format = "%s %s -I%s -I%s"
return cflags_format % (' '.join(stlport_cppflags),
os.path.join(android_platform, 'usr', 'include'),
toolchain,
' '.join(toolchain_flags),
os.path.join(gcc_include, 'include'),
os.path.join(gcc_include, 'include-fixed'))

Expand Down

0 comments on commit f94f128

Please sign in to comment.