Bug 1357556 - define a gecko_debug feature for gkrust*; r?emilio
Servo needs to know whether C++ code is compiled with MOZ_DEBUG, and
passing along an explicit feature is a better way to determine that
information than relying on cfg(debug_assertions).
MozReview-Commit-ID: B3XCskDQ56p
--- a/toolkit/library/gtest/rust/Cargo.toml
+++ b/toolkit/library/gtest/rust/Cargo.toml
@@ -5,16 +5,17 @@ authors = ["nobody@mozilla.org"]
license = "MPL-2.0"
description = "Testing code for libgkrust"
[features]
bindgen = ["gkrust-shared/bindgen"]
servo = ["gkrust-shared/servo"]
quantum_render = ["gkrust-shared/quantum_render"]
cubeb_pulse_rust = ["gkrust-shared/cubeb_pulse_rust"]
+gecko_debug = ["gkrust-shared/gecko_debug"]
[dependencies]
mp4parse-gtest = { path = "../../../../dom/media/gtest" }
nsstring-gtest = { path = "../../../../xpcom/rust/nsstring/gtest" }
gkrust-shared = { path = "../../rust/shared" }
[lib]
path = "lib.rs"
--- a/toolkit/library/gtest/rust/moz.build
+++ b/toolkit/library/gtest/rust/moz.build
@@ -6,15 +6,18 @@
features = []
if CONFIG['MOZ_STYLO']:
features += ['servo']
if CONFIG['MOZ_STYLO_BINDGEN']:
features += ['bindgen']
+ 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, '../..')
--- a/toolkit/library/rust/Cargo.toml
+++ b/toolkit/library/rust/Cargo.toml
@@ -5,16 +5,17 @@ authors = ["nobody@mozilla.org"]
license = "MPL-2.0"
description = "Rust code for libxul"
[features]
bindgen = ["gkrust-shared/bindgen"]
servo = ["gkrust-shared/servo"]
quantum_render = ["gkrust-shared/quantum_render"]
cubeb_pulse_rust = ["gkrust-shared/cubeb_pulse_rust"]
+gecko_debug = ["gkrust-shared/gecko_debug"]
[dependencies]
gkrust-shared = { path = "shared" }
[lib]
path = "lib.rs"
crate-type = ["staticlib"]
test = false
--- a/toolkit/library/rust/moz.build
+++ b/toolkit/library/rust/moz.build
@@ -6,15 +6,18 @@
features = []
if CONFIG['MOZ_STYLO']:
features += ['servo']
if CONFIG['MOZ_STYLO_BINDGEN']:
features += ['bindgen']
+ 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, '..')
--- a/toolkit/library/rust/shared/Cargo.toml
+++ b/toolkit/library/rust/shared/Cargo.toml
@@ -15,16 +15,17 @@ webrender_bindings = { path = "../../../
cubeb-pulse = { path = "../../../../media/libcubeb/cubeb-pulse-rs", optional = true, features=["pulse-dlopen"] }
[features]
default = []
bindgen = ["geckoservo/bindgen"]
servo = ["geckoservo"]
quantum_render = ["webrender_bindings"]
cubeb_pulse_rust = ["cubeb-pulse"]
+gecko_debug = ["geckoservo/gecko_debug"]
[lib]
path = "lib.rs"
test = false
doctest = false
bench = false
doc = false
plugin = false