Bug 1357556 - define a gecko_debug feature for gkrust*; r=emilio
☠☠ backed out by 37a7653a0c5f ☠ ☠
authorNathan Froyd <froydnj@mozilla.com>
Thu, 20 Apr 2017 13:54:14 -0400
changeset 566293 1ac0a2d75a615ae66647966511d08d12529a20ce
parent 566292 c8c1952346f3861dfed9b834db359f5a6a83e475
child 566294 9a8c26fc01203888d8c7420c3ba030708d67c944
push id55180
push userjjong@mozilla.com
push dateFri, 21 Apr 2017 09:36:13 +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
@@ -4,16 +4,17 @@ version = "0.1.0"
 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"]
+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
@@ -9,9 +9,12 @@ if CONFIG['MOZ_STYLO']:
     features += ['servo']
 
     if CONFIG['MOZ_STYLO_BINDGEN']:
         features += ['bindgen']
 
 if CONFIG['MOZ_BUILD_WEBRENDER']:
     features += ['quantum_render']
 
+if CONFIG['MOZ_DEBUG']:
+    features += ['gecko_debug']
+
 RustLibrary('gkrust-gtest', features, '../..')
--- a/toolkit/library/rust/Cargo.toml
+++ b/toolkit/library/rust/Cargo.toml
@@ -4,16 +4,17 @@ version = "0.1.0"
 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"]
+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
@@ -9,9 +9,12 @@ if CONFIG['MOZ_STYLO']:
     features += ['servo']
 
     if CONFIG['MOZ_STYLO_BINDGEN']:
         features += ['bindgen']
 
 if CONFIG['MOZ_BUILD_WEBRENDER']:
     features += ['quantum_render']
 
+if CONFIG['MOZ_DEBUG']:
+    features += ['gecko_debug']
+
 RustLibrary('gkrust', features, '..')
--- a/toolkit/library/rust/shared/Cargo.toml
+++ b/toolkit/library/rust/shared/Cargo.toml
@@ -13,16 +13,17 @@ nserror = { path = "../../../../xpcom/ru
 rust_url_capi = { path = "../../../../netwerk/base/rust-url-capi" }
 webrender_bindings = { path = "../../../../gfx/webrender_bindings", optional = true }
 
 [features]
 default = []
 bindgen = ["geckoservo/bindgen"]
 servo = ["geckoservo"]
 quantum_render = ["webrender_bindings"]
+gecko_debug = ["geckoservo/gecko_debug"]
 
 [lib]
 path = "lib.rs"
 test = false
 doctest = false
 bench = false
 doc = false
 plugin = false