Skip to content

Commit 8689c0b

Browse files
author
bors-servo
authored
Auto merge of #162 - pcwalton:mojave, r=jdm
Pass the appropriate `-stdlib` C++ compiler flag to the configure script. We were already choosing the appropriate flag when compiling `jsglue.cpp`, but we didn't pass the flag along to `configure`, so on macOS Mojave the configure script would detect a seemingly-broken C++ compiler and abort. r? @jdm <!-- 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/162) <!-- Reviewable:end -->
2 parents 180b01c + b76b428 commit 8689c0b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

build.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ fn build_jsapi() {
101101
cmd.env("MAKEFLAGS", makeflags);
102102
}
103103

104+
if target.contains("apple") || target.contains("freebsd") {
105+
cmd.env("CXXFLAGS", "-stdlib=libc++");
106+
}
107+
104108
let result = cmd.args(&["-R", "-f", "makefile.cargo"])
105109
.stdout(Stdio::inherit())
106110
.stderr(Stdio::inherit())

0 commit comments

Comments
 (0)