forked from mirrors/gecko-dev
Bug 1751331 - Remove MOZ_DIST. r=firefox-build-system-reviewers,mhentges
As mentioned in bug 1747354, the location of the dist directory is relied to be $topobjdir/dist, so just use that consistently rather than getting it from a separate variable for rust build scripts. Differential Revision: https://phabricator.services.mozilla.com/D136556
This commit is contained in:
parent
a215c65d60
commit
e7c54fc571
4 changed files with 7 additions and 18 deletions
|
|
@ -214,7 +214,6 @@ export RUSTC
|
||||||
export RUSTDOC
|
export RUSTDOC
|
||||||
export RUSTFMT
|
export RUSTFMT
|
||||||
export MOZ_SRC=$(topsrcdir)
|
export MOZ_SRC=$(topsrcdir)
|
||||||
export MOZ_DIST=$(ABS_DIST)
|
|
||||||
export LIBCLANG_PATH=$(MOZ_LIBCLANG_PATH)
|
export LIBCLANG_PATH=$(MOZ_LIBCLANG_PATH)
|
||||||
export CLANG_PATH=$(MOZ_CLANG_PATH)
|
export CLANG_PATH=$(MOZ_CLANG_PATH)
|
||||||
export PKG_CONFIG
|
export PKG_CONFIG
|
||||||
|
|
|
||||||
|
|
@ -7,16 +7,6 @@ use std::env;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let dist_path = {
|
|
||||||
let path = PathBuf::from(env::var_os("MOZ_DIST").unwrap());
|
|
||||||
if !path.is_absolute() || !path.is_dir() {
|
|
||||||
panic!(
|
|
||||||
"MOZ_DIST must be an absolute directory, was: {}",
|
|
||||||
path.display()
|
|
||||||
);
|
|
||||||
}
|
|
||||||
path
|
|
||||||
};
|
|
||||||
let topobjdir = {
|
let topobjdir = {
|
||||||
let path = PathBuf::from(env::var_os("MOZ_TOPOBJDIR").unwrap());
|
let path = PathBuf::from(env::var_os("MOZ_TOPOBJDIR").unwrap());
|
||||||
if !path.is_absolute() || !path.is_dir() {
|
if !path.is_absolute() || !path.is_dir() {
|
||||||
|
|
@ -31,7 +21,7 @@ fn main() {
|
||||||
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(topobjdir.join("js").join("src"));
|
||||||
build.include(dist_path.join("include"));
|
build.include(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");
|
||||||
|
|
|
||||||
|
|
@ -58,11 +58,11 @@ lazy_static! {
|
||||||
};
|
};
|
||||||
static ref INCLUDE_RE: Regex = Regex::new(r#"#include\s*"(.+?)""#).unwrap();
|
static ref INCLUDE_RE: Regex = Regex::new(r#"#include\s*"(.+?)""#).unwrap();
|
||||||
static ref DISTDIR_PATH: PathBuf = {
|
static ref DISTDIR_PATH: PathBuf = {
|
||||||
let path = PathBuf::from(env::var_os("MOZ_DIST").unwrap());
|
let path = PathBuf::from(env::var_os("MOZ_TOPOBJDIR").unwrap());
|
||||||
if !path.is_absolute() || !path.is_dir() {
|
if !path.is_absolute() || !path.is_dir() {
|
||||||
panic!("MOZ_DIST must be an absolute directory, was: {}", path.display());
|
panic!("MOZ_TOPOBJDIR must be an absolute directory, was: {}", path.display());
|
||||||
}
|
}
|
||||||
path
|
path.join("dist")
|
||||||
};
|
};
|
||||||
static ref SEARCH_PATHS: Vec<PathBuf> = vec![
|
static ref SEARCH_PATHS: Vec<PathBuf> = vec![
|
||||||
DISTDIR_PATH.join("include"),
|
DISTDIR_PATH.join("include"),
|
||||||
|
|
|
||||||
|
|
@ -33,11 +33,11 @@ lazy_static! {
|
||||||
.collect()
|
.collect()
|
||||||
};
|
};
|
||||||
static ref DISTDIR_PATH: PathBuf = {
|
static ref DISTDIR_PATH: PathBuf = {
|
||||||
let path = PathBuf::from(env::var_os("MOZ_DIST").unwrap());
|
let path = PathBuf::from(env::var_os("MOZ_TOPOBJDIR").unwrap());
|
||||||
if !path.is_absolute() || !path.is_dir() {
|
if !path.is_absolute() || !path.is_dir() {
|
||||||
panic!("MOZ_DIST must be an absolute directory, was: {}", path.display());
|
panic!("MOZ_TOPOBJDIR must be an absolute directory, was: {}", path.display());
|
||||||
}
|
}
|
||||||
path
|
path.join("dist")
|
||||||
};
|
};
|
||||||
static ref SEARCH_PATHS: Vec<PathBuf> = vec![
|
static ref SEARCH_PATHS: Vec<PathBuf> = vec![
|
||||||
DISTDIR_PATH.join("include"),
|
DISTDIR_PATH.join("include"),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue