Bug 1102602 - Avoid moz.build errors when passing a mozglue argument to Gecko* templates. r=gps
authorMike Hommey <mh+mozilla@glandium.org>
Fri, 21 Nov 2014 09:38:08 +0900
changeset 217053 0c83767de482e983650a8b125718ab5e9cb3fe77
parent 217052 97c40a737bda80ed40fa25ba6e4c69f6fd8789db
child 217054 60943ff53aebaa01d0186a5baab60a3dd7eba669
push id52218
push usercbook@mozilla.com
push dateMon, 24 Nov 2014 08:44:31 +0000
treeherdermozilla-inbound@3aca2904c54a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs1102602
milestone36.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 1102602 - Avoid moz.build errors when passing a mozglue argument to Gecko* templates. r=gps
build/gecko_templates.mozbuild
--- a/build/gecko_templates.mozbuild
+++ b/build/gecko_templates.mozbuild
@@ -85,67 +85,77 @@ def GeckoProgram(name, linkage='standalo
 
     `name` identifies the executable base name.
 
     See the documentation for `GeckoBinary` for other possible arguments,
     with the notable difference that the default for `linkage` is 'standalone'.
     '''
     Program(name)
 
-    GeckoBinary(linkage=linkage, mozglue='program', **kwargs)
+    kwargs.setdefault('mozglue', 'program')
+
+    GeckoBinary(linkage=linkage, **kwargs)
 
 
 @template
 def GeckoSimplePrograms(names, **kwargs):
     '''Template for simple program executables related to Gecko.
 
     `names` identifies the executable base names for each executable.
 
     See the documentation for `GeckoBinary` for other possible arguments.
     '''
     SimplePrograms(names)
 
-    GeckoBinary(mozglue='program', **kwargs)
+    kwargs.setdefault('mozglue', 'program')
+
+    GeckoBinary(**kwargs)
 
 
 @template
 def GeckoCppUnitTests(names, **kwargs):
     '''Template for C++ unit tests related to Gecko.
 
     `names` identifies the executable base names for each executable.
 
     See the documentation for `GeckoBinary` for other possible arguments.
     '''
     CppUnitTests(names)
 
-    GeckoBinary(mozglue='program', **kwargs)
+    kwargs.setdefault('mozglue', 'program')
+
+    GeckoBinary(**kwargs)
 
 
 @template
 def GeckoSharedLibrary(name, **kwargs):
     '''Template for shared libraries related to Gecko.
 
     `name` identifies the library base name.
     See the documentation for `GeckoBinary` for other possible arguments.
     '''
     SharedLibrary(name)
 
-    GeckoBinary(mozglue='library', **kwargs)
+    kwargs.setdefault('mozglue', 'library')
+
+    GeckoBinary(**kwargs)
 
 
 @template
 def GeckoFramework(name, **kwargs):
     '''Template for OSX frameworks related to Gecko.
 
     `name` identifies the library base name.
     See the documentation for `GeckoBinary` for other possible arguments.
     '''
     Framework(name)
 
-    GeckoBinary(mozglue='library', **kwargs)
+    kwargs.setdefault('mozglue', 'library')
+
+    GeckoBinary(**kwargs)
 
 
 @template
 def XPCOMBinaryComponent(name):
     '''Template defining an XPCOM binary component for Gecko.
 
     `name` is the name of the component.
     '''