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 RUSTFMT
|
||||
export MOZ_SRC=$(topsrcdir)
|
||||
export MOZ_DIST=$(ABS_DIST)
|
||||
export LIBCLANG_PATH=$(MOZ_LIBCLANG_PATH)
|
||||
export CLANG_PATH=$(MOZ_CLANG_PATH)
|
||||
export PKG_CONFIG
|
||||
|
|
|
|||
|
|
@ -7,16 +7,6 @@ use std::env;
|
|||
use std::path::PathBuf;
|
||||
|
||||
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 path = PathBuf::from(env::var_os("MOZ_TOPOBJDIR").unwrap());
|
||||
if !path.is_absolute() || !path.is_dir() {
|
||||
|
|
@ -31,7 +21,7 @@ fn main() {
|
|||
build.cpp(true);
|
||||
// For js-confdefs.h, see wrappers.cpp.
|
||||
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.file("wrappers.cpp");
|
||||
build.compile("wrappers");
|
||||
|
|
|
|||
|
|
@ -58,11 +58,11 @@ lazy_static! {
|
|||
};
|
||||
static ref INCLUDE_RE: Regex = Regex::new(r#"#include\s*"(.+?)""#).unwrap();
|
||||
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() {
|
||||
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![
|
||||
DISTDIR_PATH.join("include"),
|
||||
|
|
|
|||
|
|
@ -33,11 +33,11 @@ lazy_static! {
|
|||
.collect()
|
||||
};
|
||||
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() {
|
||||
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![
|
||||
DISTDIR_PATH.join("include"),
|
||||
|
|
|
|||
Loading…
Reference in a new issue