Bug 1357556 - define a gecko_debug feature for gkrust*; r?emilio draft
authorNathan Froyd <froydnj@mozilla.com>
Thu, 20 Apr 2017 13:54:14 -0400
changeset 566609 87705011084d26817d93d0b232e8c454db00a54e
parent 566378 dd530a59750adcaa0d48fa4f69b0cdb52715852a
child 625381 e7edb9642888950a6d832c8b57f602ebacd32fc8
push id55287
push userbmo:nfroyd@mozilla.com
push dateFri, 21 Apr 2017 21:58:16 +0000
reviewersemilio
bugs1357556
milestone55.0a1
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
toolkit/library/gtest/rust/Cargo.toml
toolkit/library/gtest/rust/moz.build
toolkit/library/rust/Cargo.toml
toolkit/library/rust/moz.build
toolkit/library/rust/shared/Cargo.toml
--- 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