Bug 1359425 - commonize the Rust feature definitions for gkrust*; r=rillian
authorNathan Froyd <froydnj@mozilla.com>
Wed, 26 Apr 2017 10:43:03 -0400
changeset 403194 c8884c38a51d35cc619e235a17ae1296f8119760
parent 403193 abb6e3b5e032a630b7c995b91a205e16d03f7c58
child 403195 1aa3673f1b9c700190b9791cb67f704fd160d454
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrillian
bugs1359425
milestone55.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 1359425 - commonize the Rust feature definitions for gkrust*; r=rillian Having these definitions in two different places is silly, especially when they must be identical. If they ever got out of sync, there would be problems.
toolkit/library/gtest/rust/moz.build
toolkit/library/rust/gkrust-features.mozbuild
toolkit/library/rust/moz.build
--- a/toolkit/library/gtest/rust/moz.build
+++ b/toolkit/library/gtest/rust/moz.build
@@ -1,23 +1,9 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-features = []
-if CONFIG['MOZ_STYLO']:
-    features += ['servo']
-
-    if CONFIG['MOZ_STYLO_BINDGEN']:
-        features += ['bindgen']
+include('../../rust/gkrust-features.mozbuild')
 
-    if CONFIG['MOZ_DEBUG']:
-        features += ['gecko_debug']
-
-if CONFIG['MOZ_BUILD_WEBRENDER']:
-    features += ['quantum_render']
-
-if CONFIG['MOZ_PULSEAUDIO']:
-    features += ['cubeb_pulse_rust']
-
-RustLibrary('gkrust-gtest', features, '../..')
+RustLibrary('gkrust-gtest', gkrust_features, '../..')
new file mode 100644
--- /dev/null
+++ b/toolkit/library/rust/gkrust-features.mozbuild
@@ -0,0 +1,22 @@
+# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+gkrust_features = []
+if CONFIG['MOZ_STYLO']:
+    gkrust_features += ['servo']
+
+    if CONFIG['MOZ_STYLO_BINDGEN']:
+        gkrust_features += ['bindgen']
+
+    if CONFIG['MOZ_DEBUG']:
+        gkrust_features += ['gecko_debug']
+
+if CONFIG['MOZ_BUILD_WEBRENDER']:
+    gkrust_features += ['quantum_render']
+
+if CONFIG['MOZ_PULSEAUDIO']:
+    gkrust_features += ['cubeb_pulse_rust']
+
--- a/toolkit/library/rust/moz.build
+++ b/toolkit/library/rust/moz.build
@@ -1,23 +1,9 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-features = []
-if CONFIG['MOZ_STYLO']:
-    features += ['servo']
-
-    if CONFIG['MOZ_STYLO_BINDGEN']:
-        features += ['bindgen']
+include('gkrust-features.mozbuild')
 
-    if CONFIG['MOZ_DEBUG']:
-        features += ['gecko_debug']
-
-if CONFIG['MOZ_BUILD_WEBRENDER']:
-    features += ['quantum_render']
-
-if CONFIG['MOZ_PULSEAUDIO']:
-    features += ['cubeb_pulse_rust']
-
-RustLibrary('gkrust', features, '..')
+RustLibrary('gkrust', gkrust_features, '..')