Bug 1302028 - part 5 - conditionally add bindgen features to gkrust* libraries; r?gps draft
authorNathan Froyd <froydnj@mozilla.com>
Thu, 15 Dec 2016 10:59:52 -0500
changeset 453508 47c6fb572b27dfb891bdce8ae0453980db2c0e9f
parent 453507 ea0aecb876f9ecf9bf7a9f4d1c3fbe8d62e5e849
child 453509 4d25f30115c84913c9d2389585f2048efd9be40e
push id39696
push userbmo:nfroyd@mozilla.com
push dateFri, 23 Dec 2016 18:35:18 +0000
reviewersgps
bugs1302028
milestone53.0a1
Bug 1302028 - part 5 - conditionally add bindgen features to gkrust* libraries; r?gps We need the bindgen feature if we're building with Stylo and we've enabled build-time bindgen. (Build-time bindgen is the default.) MozReview-Commit-ID: C9enkNPlUK7
toolkit/library/gtest/rust/moz.build
toolkit/library/rust/moz.build
--- a/toolkit/library/gtest/rust/moz.build
+++ b/toolkit/library/gtest/rust/moz.build
@@ -1,7 +1,11 @@
 # -*- 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/.
 
-RustLibrary('gkrust-gtest')
+features = []
+if CONFIG['MOZ_STYLO'] and CONFIG['MOZ_STYLO_BINDGEN']:
+    features += ['bindgen']
+
+RustLibrary('gkrust-gtest', features)
--- a/toolkit/library/rust/moz.build
+++ b/toolkit/library/rust/moz.build
@@ -1,7 +1,11 @@
 # -*- 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/.
 
-RustLibrary('gkrust')
+features = []
+if CONFIG['MOZ_STYLO'] and CONFIG['MOZ_STYLO_BINDGEN']:
+    features += ['bindgen']
+
+RustLibrary('gkrust', features)