Skip to content

Commit b3bc066

Browse files
author
bors-servo
authored
Auto merge of #136 - asajeffrey:pass-cxx-flags-to-bindgen, r=jdm
Pass CXXFLAGS to bindgen Bindgen doesn't pass CXXFLAGS to clang, which causes cross-compile issues, e.g. http://build.servo.org/builders/android/builds/11618. <!-- 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/136) <!-- Reviewable:end -->
2 parents 7ea89d9 + d1901a3 commit b3bc066

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

build.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,12 @@ fn build_jsapi_bindings() {
159159
builder = builder.clang_arg("-fms-compatibility");
160160
}
161161

162+
if let Ok(flags) = env::var("CXXFLAGS") {
163+
for flag in flags.split_whitespace() {
164+
builder = builder.clang_arg(flag);
165+
}
166+
}
167+
162168
for flag in cc_flags() {
163169
builder = builder.clang_arg(flag);
164170
}

0 commit comments

Comments
 (0)