Auto merge of #15529 - jbeich:freebsd, r=emilio

style: unbreak bindgen on BSDs and Solaris

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [x] These changes fix Firefox [bug 1339033](https://bugzilla.mozilla.org/show_bug.cgi?id=1339033)
<!-- Either: -->
- [x] These changes do not require tests because Tier3 platforms support is incomplete

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15529)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-02-13 06:09:03 -08:00 committed by GitHub
commit 5d8870fda9

View file

@ -136,6 +136,16 @@ mod bindings {
}
if cfg!(target_os = "linux") {
builder = builder.clang_arg("-DOS_LINUX=1");
} else if cfg!(target_os = "solaris") {
builder = builder.clang_arg("-DOS_SOLARIS=1")
} else if cfg!(target_os = "dragonfly") {
builder = builder.clang_arg("-DOS_BSD=1").clang_arg("-DOS_DRAGONFLY=1")
} else if cfg!(target_os = "freebsd") {
builder = builder.clang_arg("-DOS_BSD=1").clang_arg("-DOS_FREEBSD=1")
} else if cfg!(target_os = "netbsd") {
builder = builder.clang_arg("-DOS_BSD=1").clang_arg("-DOS_NETBSD=1")
} else if cfg!(target_os = "openbsd") {
builder = builder.clang_arg("-DOS_BSD=1").clang_arg("-DOS_OPENBSD=1")
} else if cfg!(target_os = "macos") {
builder = builder.clang_arg("-DOS_MACOSX=1")
.clang_arg("-stdlib=libc++")