Bug 1751331 - Use the mozbuild crate in static_prefs. r?KrisWright draft
authorMike Hommey <mh+mozilla@glandium.org>
Fri, 21 Jan 2022 06:18:28 +0000
changeset 4180208 92ecd7973e6743d653b5bdf0997ff169a5bed0a5
parent 4180207 91999c0dad3f3353122653baea65d17774e9eb5e
child 4180209 117631c224e7e2ec3d7f5477b0dd7fea70e2a02e
push id771621
push userreviewbot
push dateFri, 21 Jan 2022 06:19:17 +0000
treeherdertry@fbea6c71d0a0 [default view] [failures only]
reviewersKrisWright
bugs1751331
milestone98.0a1
Bug 1751331 - Use the mozbuild crate in static_prefs. r?KrisWright Differential Diff: PHID-DIFF-jofzapbycebluwyoqdfw
Cargo.lock
modules/libpref/init/static_prefs/Cargo.toml
modules/libpref/init/static_prefs/src/lib.rs
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4763,16 +4763,19 @@ checksum = "a8f112729512f8e442d81f95a8a7
 name = "static_assertions"
 version = "1.1.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
 
 [[package]]
 name = "static_prefs"
 version = "0.1.0"
+dependencies = [
+ "mozbuild",
+]
 
 [[package]]
 name = "storage"
 version = "0.1.0"
 dependencies = [
  "libc",
  "nserror",
  "nsstring",
--- a/modules/libpref/init/static_prefs/Cargo.toml
+++ b/modules/libpref/init/static_prefs/Cargo.toml
@@ -2,8 +2,9 @@
 name = "static_prefs"
 version = "0.1.0"
 authors = ["Nicholas Nethercote <nnethercote@mozilla.com>"]
 edition = "2018"
 
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
 
 [dependencies]
+mozbuild = "0.1"
--- a/modules/libpref/init/static_prefs/src/lib.rs
+++ b/modules/libpref/init/static_prefs/src/lib.rs
@@ -3,12 +3,9 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 //! This module contains getters for static prefs.
 //!
 //! The contents of this module are generated by
 //! `modules/libpref/init/generate_static_pref_list.py`, from
 //! `modules/libpref/init/StaticPrefList.yaml`.
 
-include!(concat!(
-    env!("MOZ_TOPOBJDIR"),
-    "/modules/libpref/static_prefs.rs"
-));
+include!(mozbuild::objdir_path!("modules/libpref/static_prefs.rs"));