Commit 1654ae73 authored by Mike Hommey's avatar Mike Hommey
Browse files

Bug 1751331 - Use the mozbuild crate in moz_asserts. r=emilio

parent b049d1d9
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -3211,6 +3211,9 @@ dependencies = [
[[package]]
name = "moz_asserts"
version = "0.1.0"
dependencies = [
 "mozbuild",
]

[[package]]
name = "moz_cbor"
+2 −3
Original line number Diff line number Diff line
@@ -7,6 +7,5 @@ license = "MPL-2.0"
[lib]
path = "lib.rs"

[features]
nightly = []
diagnostic = []
[dependencies]
mozbuild = "0.1"
+2 −2
Original line number Diff line number Diff line
@@ -19,10 +19,10 @@
// is also how rust's `debug_assert!` is implemented)

/// Whether Nightly-only assertions are enabled.
pub const NIGHTLY_BUILD: bool = cfg!(feature = "nightly");
pub use mozbuild::config::NIGHTLY_BUILD;

/// Whether diagnostic assertions are enabled.
pub const MOZ_DIAGNOSTIC_ASSERT_ENABLED: bool = cfg!(feature = "diagnostic");
pub use mozbuild::config::MOZ_DIAGNOSTIC_ASSERT_ENABLED;

/// assert! on Nightly, gets compiled out otherwise.
#[macro_export]
+0 −6
Original line number Diff line number Diff line
@@ -6,12 +6,6 @@

gkrust_features = []

if CONFIG['NIGHTLY_BUILD']:
    gkrust_features += ['gkrust-shared/moz_asserts_nightly']

if CONFIG['MOZ_DIAGNOSTIC_ASSERT_ENABLED']:
    gkrust_features += ['gkrust-shared/moz_asserts_diagnostic']

if CONFIG['MOZ_DEBUG']:
    gkrust_features += [
        'gecko_debug',
+0 −2
Original line number Diff line number Diff line
@@ -81,8 +81,6 @@ webext_storage_bridge = { path = "../../../components/extensions/storage/webext_

[features]
default = []
moz_asserts_nightly = ["moz_asserts/nightly"]
moz_asserts_diagnostic = ["moz_asserts/diagnostic"]
cubeb-remoting = ["cubeb-sys", "audioipc-client", "audioipc-server", "audioipc2-client", "audioipc2-server"]
cubeb_coreaudio_rust = ["cubeb-sys", "cubeb-coreaudio"]
cubeb_pulse_rust = ["cubeb-sys", "cubeb-pulse"]