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 229045 0c83767de482e983650a8b125718ab5e9cb3fe77
parent 229044 97c40a737bda80ed40fa25ba6e4c69f6fd8789db
child 229046 60943ff53aebaa01d0186a5baab60a3dd7eba669
push id136
push userahalberstadt@mozilla.com
push dateMon, 24 Nov 2014 14:50:12 +0000
reviewersgps
bugs1102602
milestone36.0a1
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.
     '''