Bug 1319156 - followup - only assign RUST_LIBRARY_FEATURES when features are provided to RustLibrary; r=me
authorNathan Froyd <froydnj@mozilla.com>
Fri, 02 Dec 2016 11:56:43 -0500
changeset 325175 a7ab3fbb933fb1ea7a0f6d5809a663d8242fab9b
parent 325174 db686076ae29249df47ff792c996de293d23cd6f
child 325176 31df891218346024104dccc83ee4ead81a1b756c
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
reviewersme
bugs1319156
milestone53.0a1
Bug 1319156 - followup - only assign RUST_LIBRARY_FEATURES when features are provided to RustLibrary; r=me Do this to re-open the CLOSED TREE.
build/templates.mozbuild
--- a/build/templates.mozbuild
+++ b/build/templates.mozbuild
@@ -60,21 +60,20 @@ def Library(name):
     LIBRARY_NAME = name
 
 
 @template
 def RustLibrary(name, features=None):
     '''Template for Rust libraries.'''
     Library(name)
 
-    if not features:
-        features = []
+    IS_RUST_LIBRARY = True
 
-    IS_RUST_LIBRARY = True
-    RUST_LIBRARY_FEATURES = features
+    if features:
+        RUST_LIBRARY_FEATURES = features
 
 
 @template
 def SharedLibrary(name):
     '''Template for shared libraries.'''
     Library(name)
 
     FORCE_SHARED_LIB = True