From 4c9531deec2148440cd57b5d500ffa604cd821a8 Mon Sep 17 00:00:00 2001 From: Chris H-C Date: Tue, 19 Nov 2019 13:52:28 +0000 Subject: [PATCH] Bug 1591563 - Only build the fogotype crate on Nightly r=janerik,lina Depends on D53713 Differential Revision: https://phabricator.services.mozilla.com/D53714 --HG-- extra : moz-landing-system : lando --- toolkit/library/rust/Cargo.toml | 1 + toolkit/library/rust/gkrust-features.mozbuild | 3 +++ toolkit/library/rust/shared/Cargo.toml | 3 ++- toolkit/library/rust/shared/lib.rs | 1 + toolkit/moz.configure | 11 +++++++++++ 5 files changed, 18 insertions(+), 1 deletion(-) diff --git a/toolkit/library/rust/Cargo.toml b/toolkit/library/rust/Cargo.toml index 786645106085..a16562c18c4b 100644 --- a/toolkit/library/rust/Cargo.toml +++ b/toolkit/library/rust/Cargo.toml @@ -30,6 +30,7 @@ fuzzing_interfaces = ["gkrust-shared/fuzzing_interfaces"] webrtc = ["gkrust-shared/webrtc"] wasm_library_sandboxing = ["gkrust-shared/wasm_library_sandboxing"] webgpu = ["gkrust-shared/webgpu"] +fogotype = ["gkrust-shared/fogotype"] [dependencies] gkrust-shared = { path = "shared" } diff --git a/toolkit/library/rust/gkrust-features.mozbuild b/toolkit/library/rust/gkrust-features.mozbuild index a08bb8a094b9..8764e82569e7 100644 --- a/toolkit/library/rust/gkrust-features.mozbuild +++ b/toolkit/library/rust/gkrust-features.mozbuild @@ -67,3 +67,6 @@ if CONFIG['FUZZING_INTERFACES']: if CONFIG['MOZ_WEBRTC']: gkrust_features += ['webrtc'] + +if CONFIG['MOZ_FOGOTYPE']: + gkrust_features += ['fogotype'] diff --git a/toolkit/library/rust/shared/Cargo.toml b/toolkit/library/rust/shared/Cargo.toml index 172357b2eb45..4ded33ec389f 100644 --- a/toolkit/library/rust/shared/Cargo.toml +++ b/toolkit/library/rust/shared/Cargo.toml @@ -45,7 +45,7 @@ neqo_glue = { path = "../../../../netwerk/socket/neqo_glue" } rlbox_lucet_sandbox = { version = "0.1.0", optional = true } wgpu-remote = { path = "../../../../gfx/wgpu/wgpu-remote", optional = true } mapped_hyph = { git = "https://github.com/jfkthame/mapped_hyph.git", tag = "v0.3.0" } -fog = { path = "../../../components/telemetry/fog" } +fog = { path = "../../../components/telemetry/fog", optional = true } [build-dependencies] rustc_version = "0.2" @@ -75,6 +75,7 @@ fuzzing_interfaces = [] webrtc = ["mdns_service"] wasm_library_sandboxing = ["rlbox_lucet_sandbox"] webgpu = ["wgpu-remote"] +fogotype = ["fog"] [lib] path = "lib.rs" diff --git a/toolkit/library/rust/shared/lib.rs b/toolkit/library/rust/shared/lib.rs index 37d0e060bb1d..d1f03f37b000 100644 --- a/toolkit/library/rust/shared/lib.rs +++ b/toolkit/library/rust/shared/lib.rs @@ -46,6 +46,7 @@ extern crate storage; #[cfg(feature = "moz_places")] extern crate bookmark_sync; extern crate shift_or_euc_c; +#[cfg(feature = "fogotype")] extern crate fog; extern crate audio_thread_priority; diff --git a/toolkit/moz.configure b/toolkit/moz.configure index d877c80301e3..6d2148600f80 100644 --- a/toolkit/moz.configure +++ b/toolkit/moz.configure @@ -1892,3 +1892,14 @@ def new_cert_storage(milestone): set_config('MOZ_NEW_CERT_STORAGE', True, when=new_cert_storage) set_define('MOZ_NEW_CERT_STORAGE', True, when=new_cert_storage) + +# FOGotype prototype Glean SDK Integration Crate +# ============================================================== + +@depends(milestone) +def fogotype(milestone): + if milestone.is_nightly: + return True + +set_config('MOZ_FOGOTYPE', True, when=fogotype) +set_define('MOZ_FOGOTYPE', True, when=fogotype)