Skip to content

Commit 618398c

Browse files
author
bors-servo
authored
Auto merge of #211 - servo:outdir, r=SimonSapin
Restore outdir build metadata This is accessed by rust-mozjs so it can build its own jsglue.cpp. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/mozjs/211) <!-- Reviewable:end -->
2 parents 895dc84 + 29b28ec commit 618398c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

build.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ fn main() {
5454
let src_dir = out_dir.join("mozjs");
5555
let build_dir = out_dir.join("build");
5656

57+
// Used by rust-mozjs downstream, don't remove.
58+
println!("cargo:outdir={}", build_dir.display());
59+
5760
copy_sources("mozjs".as_ref(), &src_dir);
5861

5962
fs::create_dir_all(&build_dir).expect("could not create build dir");
@@ -64,7 +67,6 @@ fn main() {
6467
}
6568

6669
fn find_make() -> OsString {
67-
println!("cargo:rerun-if-env-changed=MAKE");
6870
if let Some(make) = env::var_os("MAKE") {
6971
make
7072
} else {
@@ -124,7 +126,6 @@ fn build_jsapi(src_dir: &Path, build_dir: &Path) {
124126
let mut make = find_make();
125127

126128
// Put MOZTOOLS_PATH at the beginning of PATH if specified
127-
println!("cargo:rerun-if-env-changed=MOZTOOLS_PATH");
128129
if let Some(moztools) = env::var_os("MOZTOOLS_PATH") {
129130
let path = env::var_os("PATH").unwrap();
130131
let mut paths = Vec::new();
@@ -242,14 +243,12 @@ fn build_jsapi_bindings(build_dir: &Path) {
242243
builder = builder.clang_arg("-fms-compatibility");
243244
}
244245

245-
println!("cargo:rerun-if-env-changed=CXXFLAGS");
246246
if let Ok(flags) = env::var("CXXFLAGS") {
247247
for flag in flags.split_whitespace() {
248248
builder = builder.clang_arg(flag);
249249
}
250250
}
251251

252-
println!("cargo:rerun-if-env-changed=CLANGFLAGS");
253252
if let Ok(flags) = env::var("CLANGFLAGS") {
254253
for flag in flags.split_whitespace() {
255254
builder = builder.clang_arg(flag);

0 commit comments

Comments
 (0)