summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTING.md31
-rw-r--r--Cargo.lock2
-rw-r--r--Cargo.toml2
-rw-r--r--src/ir/function.rs2
-rw-r--r--tests/expectations/tests/mangling-macos.rs9
-rw-r--r--tests/headers/mangling-macos.h3
6 files changed, 45 insertions, 4 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index bc5c883d..de5f709d 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -10,6 +10,7 @@ out to us in a GitHub issue, or stop by
- [Code of Conduct](#code-of-conduct)
- [Filing an Issue](#filing-an-issue)
+- [Looking to Start Contributing to `bindgen`?](#looking-to-start-contributing-to-bindgen)
- [Building](#building)
- [Testing](#testing)
- [Overview](#overview)
@@ -18,6 +19,7 @@ out to us in a GitHub issue, or stop by
- [Authoring New Tests](#authoring-new-tests)
- [Test Expectations and `libclang` Versions](#test-expectations-and-libclang-versions)
- [Automatic code formatting](#automatic-code-formatting)
+- [Pull Requests and Code Reviews](#pull-requests-and-code-reviews)
- [Generating Graphviz Dot Files](#generating-graphviz-dot-files)
- [Debug Logging](#debug-logging)
- [Using `creduce` to Minimize Test Cases](#using-creduce-to-minimize-test-cases)
@@ -37,12 +39,18 @@ We abide by the [Rust Code of Conduct][coc] and ask that you do as well.
Think you've found a bug? File an issue! To help us understand and reproduce the
issue, provide us with:
-* A (preferrably reduced) C/C++ header file that reproduces the issue
+* A (preferably reduced) C/C++ header file that reproduces the issue
* The `bindgen` flags used to reproduce the issue with the header file
* The expected `bindgen` output
* The actual `bindgen` output
* The [debugging logs](#logs) generated when running `bindgen` on this testcase
+## Looking to Start Contributing to `bindgen`?
+
+* [Issues labeled "easy"](https://github.com/servo/rust-bindgen/issues?q=is%3Aopen+is%3Aissue+label%3AE-easy)
+* [Issues labeled "less easy"](https://github.com/servo/rust-bindgen/issues?q=is%3Aopen+is%3Aissue+label%3AE-less-easy)
+* Still can't find something to work on? [Drop a comment here](https://github.com/servo/rust-bindgen/issues/747)
+
## Building
To build the `bindgen` library and the `bindgen` executable:
@@ -176,6 +184,27 @@ $ cargo fmt
The code style is described in the `rustfmt.toml` file in top level of the repo.
+## Pull Requests and Code Reviews
+
+Ensure that each commit stands alone, and passes tests. This enables better `git
+bisect`ing when needed. If your commits do not stand on their own, then rebase
+them on top of the latest master and squash them into a single commit.
+
+All pull requests undergo code review before merging. To request review, comment
+`r? @github_username_of_reviewer`. They we will respond with `r+` to approve the
+pull request, or may leave feedback and request changes to the pull request. Any
+changes should be squashed into the original commit.
+
+Unsure who to ask for review? Ask any of:
+
+* `@emilio`
+* `@fitzgen`
+
+More resources:
+
+* [Servo's GitHub Workflow](https://github.com/servo/servo/wiki/Github-workflow)
+* [Beginner's Guide to Rebasing and Squashing](https://github.com/servo/servo/wiki/Beginner's-guide-to-rebasing-and-squashing)
+
## Generating Graphviz Dot Files
We can generate [Graphviz](http://graphviz.org/pdf/dotguide.pdf) dot files from
diff --git a/Cargo.lock b/Cargo.lock
index 71b67905..e0763e1d 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1,6 +1,6 @@
[root]
name = "bindgen"
-version = "0.25.4"
+version = "0.25.5"
dependencies = [
"aster 0.41.0 (registry+https://github.com/rust-lang/crates.io-index)",
"cexpr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
diff --git a/Cargo.toml b/Cargo.toml
index 4c048235..d74b11ea 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,7 +13,7 @@ name = "bindgen"
readme = "README.md"
repository = "https://github.com/servo/rust-bindgen"
documentation = "https://docs.rs/bindgen"
-version = "0.25.4"
+version = "0.25.5"
build = "build.rs"
exclude = [
diff --git a/src/ir/function.rs b/src/ir/function.rs
index 6281306b..c432a4b2 100644
--- a/src/ir/function.rs
+++ b/src/ir/function.rs
@@ -136,7 +136,7 @@ fn get_abi(cc: CXCallingConv) -> Abi {
fn mangling_hack_if_needed(ctx: &BindgenContext, symbol: &mut String) {
// NB: win64 also contains the substring "win32" in the target triple, so
// we need to actually check for i686...
- if ctx.target().contains("macos") ||
+ if ctx.target().contains("darwin") ||
(ctx.target().contains("i686") && ctx.target().contains("windows")) {
symbol.remove(0);
}
diff --git a/tests/expectations/tests/mangling-macos.rs b/tests/expectations/tests/mangling-macos.rs
new file mode 100644
index 00000000..87df5e4a
--- /dev/null
+++ b/tests/expectations/tests/mangling-macos.rs
@@ -0,0 +1,9 @@
+/* automatically generated by rust-bindgen */
+
+
+#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
+
+
+extern "C" {
+ pub fn foo();
+}
diff --git a/tests/headers/mangling-macos.h b/tests/headers/mangling-macos.h
new file mode 100644
index 00000000..230f938b
--- /dev/null
+++ b/tests/headers/mangling-macos.h
@@ -0,0 +1,3 @@
+// bindgen-flags: -- --target=x86_64-apple-darwin
+
+void foo();