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
--- 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)