forked from mirrors/gecko-dev
Bug 1751331 - Use the mozbuild crate in mozglue-static. r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D136559
This commit is contained in:
parent
68e6c861f5
commit
f81fea13ae
3 changed files with 11 additions and 18 deletions
12
Cargo.lock
generated
12
Cargo.lock
generated
|
|
@ -3240,6 +3240,13 @@ dependencies = [
|
||||||
"moz_task",
|
"moz_task",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "mozbuild"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"once_cell",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mozdevice"
|
name = "mozdevice"
|
||||||
version = "0.4.0"
|
version = "0.4.0"
|
||||||
|
|
@ -3260,6 +3267,7 @@ version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrayvec 0.5.2",
|
"arrayvec 0.5.2",
|
||||||
"cc",
|
"cc",
|
||||||
|
"mozbuild",
|
||||||
"rustc_version",
|
"rustc_version",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
@ -6019,7 +6027,3 @@ dependencies = [
|
||||||
"podio",
|
"podio",
|
||||||
"time",
|
"time",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[patch.unused]]
|
|
||||||
name = "mozbuild"
|
|
||||||
version = "0.1.0"
|
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ path = "lib.rs"
|
||||||
arrayvec = "0.5"
|
arrayvec = "0.5"
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
|
mozbuild = "0.1"
|
||||||
cc = "1"
|
cc = "1"
|
||||||
rustc_version = "0.2"
|
rustc_version = "0.2"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,25 +3,13 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
use rustc_version::{version, Version};
|
use rustc_version::{version, Version};
|
||||||
use std::env;
|
|
||||||
use std::path::PathBuf;
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let topobjdir = {
|
|
||||||
let path = PathBuf::from(env::var_os("MOZ_TOPOBJDIR").unwrap());
|
|
||||||
if !path.is_absolute() || !path.is_dir() {
|
|
||||||
panic!(
|
|
||||||
"MOZ_TOPOBJDIR must be an absolute directory, was: {}",
|
|
||||||
path.display()
|
|
||||||
);
|
|
||||||
}
|
|
||||||
path
|
|
||||||
};
|
|
||||||
let mut build = cc::Build::new();
|
let mut build = cc::Build::new();
|
||||||
build.cpp(true);
|
build.cpp(true);
|
||||||
// For js-confdefs.h, see wrappers.cpp.
|
// For js-confdefs.h, see wrappers.cpp.
|
||||||
build.include(topobjdir.join("js").join("src"));
|
build.include(mozbuild::TOPOBJDIR.join("js").join("src"));
|
||||||
build.include(topobjdir.join("dist").join("include"));
|
build.include(mozbuild::TOPOBJDIR.join("dist").join("include"));
|
||||||
build.define("MOZ_HAS_MOZGLUE", None);
|
build.define("MOZ_HAS_MOZGLUE", None);
|
||||||
build.file("wrappers.cpp");
|
build.file("wrappers.cpp");
|
||||||
build.compile("wrappers");
|
build.compile("wrappers");
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue