Commit Graph

226 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
d7898170fb
Do a breaking version bump, yank 0.49.3
Fixes #1587
2019-07-02 00:02:40 +02:00
Emilio Cobos Álvarez
231bce8ba3
Bump bindgen version.
NOTE: For $REASONS (see https://github.com/rust-lang/rust-bindgen/issues/1587),
this is not the actual commit that is tagged on the release.
2019-07-01 23:57:40 +02:00
Emilio Cobos Álvarez
0620997bdf
Make clap optional. 2019-06-25 13:59:34 +02:00
Emilio Cobos Álvarez
5eefef7dca Bump version. 2019-05-22 15:38:54 +02:00
Emilio Cobos Álvarez
e5250a01b9 Bump version. 2019-05-16 21:44:07 +02:00
Emilio Cobos Álvarez
b7e5d8d4d5 Revert "Switch to hashbrown."
This reverts commit 8a579b134d.

Reason for revert: hashbrown made it to libstd, so this saves some dependencies.
2019-05-12 03:00:11 +02:00
Emilio Cobos Álvarez
274c25c809 Version bump. 2019-03-27 01:02:01 +01:00
Robert-André Mauchin
ce1b05f2ea Bump clang-sys to 0.28.0
Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com>
2019-03-27 00:49:28 +01:00
jhwgh1968
f29b65993e Add BINDGEN_EXTRA_CLANG_ARGS env variable 2019-03-13 22:28:31 -05:00
Emilio Cobos Álvarez
9b6d0e84b4 Work around a libclang bug / limitation.
For references, libclang returns the size and align of the pointee.

This actually matches how C++'s sizeof() and alignof() works, for some reason,
though in this case we really want to know the pointer's layout.

Anyhow, we know the target pointer size, so manually handle this case.

Filed https://bugs.llvm.org/show_bug.cgi?id=40975 for this.
2019-03-06 13:16:21 +01:00
Emilio Cobos Álvarez
ed6e1bbec4 Update default rust target to 1.33.
Closes #1529.
2019-03-04 03:53:51 +01:00
Emilio Cobos Álvarez
1cd8301274 Allow to use which 1.0.
It builds fine, and works around backtrace not building in aarch64.

https://github.com/alexcrichton/backtrace-rs/issues/160
2019-02-25 09:42:51 -08:00
Emilio Cobos Álvarez
592c7cb5eb Bump version. 2019-02-22 21:59:26 -08:00
Emilio Cobos Álvarez
02c0161cea Version bump. 2019-01-29 15:39:22 +01:00
Emilio Cobos Álvarez
8a5bfb9cdf Revert "Merge pull request #1489 from KyleMayes/clang-sys"
This reverts commit 0d004a726d, reversing
changes made to 2a01e8d499.
2019-01-27 00:49:19 +01:00
Emilio Cobos Álvarez
8747bc9c28 Bump version and update changelog. 2019-01-19 18:12:46 +01:00
Kyle Mayes
271dc73838 Update clang-sys 2019-01-12 08:48:37 -05:00
Emilio Cobos Álvarez
69a5b4a8b5 Log the libclang path. 2018-12-30 13:06:26 +01:00
Emilio Cobos Álvarez
7c24f6b2f6 Version bump. 2018-12-29 14:52:29 +01:00
Emilio Cobos Álvarez
8a579b134d Switch to hashbrown.
This wins between 2 and 5 milliseconds more in the test-case above, so no reason
not to I guess.
2018-12-23 21:10:23 +01:00
Emilio Cobos Álvarez
6f1b19fee7 Switch to FxHash for hash maps and such.
This isn't such a massive win as I'd have hoped, but it is consistently faster,
so there's no reason not to.

> ./bindgen-old tests/stylo.hpp --no-rustfmt-bindings > /dev/null 2>&1
6.17s user 0.84s system 98% cpu 7.079 total

> ./target/release/bindgen tests/stylo.hpp --no-rustfmt-bindings > /dev/null 2>
5.92s user 0.87s system 98% cpu 6.866 total

Which isn't _that_ much but it's quite a bit.
2018-12-23 21:10:23 +01:00
Emilio Cobos Álvarez
9ba6d13c43 Version bump. 2018-12-14 12:27:22 +01:00
Emilio Cobos Álvarez
370a221989 Version bump. 2018-11-30 11:59:50 +01:00
Emilio Cobos Álvarez
8e6354a5c1 Update which as well. 2018-11-30 06:38:50 +01:00
Bastien Orivel
631871c553 Update quote and proc-macro.
I give up on the doc comments. This is a rebase of #1334 keeping the formatting
of the comments and using TokenStream::from_str instead because one can hope.

Fixes #1407.
2018-11-30 06:25:53 +01:00
diwic
ef61e7cc96 Update broken links: Rust-lang-nursery => Rust-lang (#1447)
* Fix broken link to user's guide

* rust-lang-nursery => rust-lang

* rust-lang-nusery => rust-lang
2018-11-24 15:36:57 +01:00
Emilio Cobos Álvarez
68d0af91e5 Version bump. 2018-11-23 11:43:44 +01:00
Bastien Orivel
85b4b62b6d Update env_logger 2018-11-11 23:49:41 +01:00
Emilio Cobos Álvarez
b2083d5b4b
ir: Consistently append implicit template parameters when not using Rust unions.
Fixes #1429.
2018-10-29 00:33:25 +01:00
Emilio Cobos Álvarez
a242c51e6f Version bump, plus actually bump the required cexpr version. 2018-10-22 09:10:47 +02:00
Emilio Cobos Álvarez
120dd78481
Update version. 2018-10-19 02:47:13 +02:00
Emilio Cobos Álvarez
b8cd8a161c
Version bump. 2018-10-11 17:17:48 +02:00
Emilio Cobos Álvarez
b7c4e8b784
Update clang-sys. 2018-10-08 14:16:15 +02:00
Emilio Cobos Álvarez
66ba296a1e
Version bump. 2018-10-04 16:17:07 +02:00
Emilio Cobos Álvarez
0dab61ea93
Update clang-sys. 2018-10-04 15:12:17 +02:00
kpcyrd
96c5ed898d
Update cexpr dependency 2018-10-04 15:05:31 +02:00
Emilio Cobos Álvarez
c4433e08ce
v0.41.0 2018-09-30 21:03:38 +02:00
Emilio Cobos Álvarez
2319708814
Bump version. 2018-09-04 14:26:25 +02:00
Emilio Cobos Álvarez
14da023687 Version bump. 2018-08-24 15:32:34 +02:00
Sébastien Duquette
a1c9129238 address comments 2018-08-14 21:56:53 +02:00
Sébastien Duquette
b47a4c641b Convert CodegenOptions to a bitfield. 2018-08-14 21:56:53 +02:00
Emilio Cobos Álvarez
06203c4c95
Bump version. 2018-07-01 14:59:28 +02:00
Emilio Cobos Álvarez
a899ce7116
Bump version. 2018-07-01 14:08:57 +02:00
Emilio Cobos Álvarez
8a05ba495b
Bump libclang.
Fixes #1276
2018-06-16 18:33:05 -07:00
Bastien Orivel
80db42f4d7 Update regex to 1.0 and bump version 2018-05-21 17:56:47 +02:00
Emilio Cobos Álvarez
4d3674fd37
Version bump. 2018-05-18 16:08:31 +02:00
Emilio Cobos Álvarez
515ca97b46
Version bump. 2018-05-10 00:19:30 +02:00
Tamir Duberstein
ac3e4e476f
Avoid new validation in proc-macro2
Evidently, we run afoul of this.
2018-04-08 18:31:14 -04:00
Bastien Orivel
b678c8a891 Bump quote to 0.5 and proc_macro2 to 0.3 2018-04-04 17:02:52 +02:00
Bastien Orivel
6dae67ea69 Revert "Revert "Bump quote to 0.4""
This reverts commit eb415c7a7c.
2018-04-03 21:04:39 +02:00
Emilio Cobos Álvarez
ae0fdf7a55
Now that we have stuff that depends on libclang-5 we need to do this. 2018-04-03 11:27:46 +02:00
Emilio Cobos Álvarez
96bba97e7b
ir: Grab target information from clang. 2018-04-03 11:27:45 +02:00
Matt Brubeck
4ef0b23bbc Include README and LICENSE files in Cargo package.
- Include README.md so it is visible on crates.io and docs.rs.
- Include LICENSE so that the package is legal to distribute.
2018-04-02 11:49:41 -07:00
Matt Brubeck
302fe65386 Link to the user's guide from the docs and manifest 2018-04-02 11:49:41 -07:00
Emilio Cobos Álvarez
8e3e585b6e
options: Remove the linking-related options.
They do nothing, and are effectively superseded by --raw-line and friends.

They also tend to confuse people.

Closes #104
2018-03-31 03:28:49 +02:00
Emilio Cobos Álvarez
fb069e9391
Version bump 2018-03-25 20:22:06 +02:00
Emilio Cobos Álvarez
cd7e095091
Breaking version bump. 2018-03-13 12:16:55 +01:00
Bastien Orivel
69355f8d9e Update clang-sys and bump version 2018-03-13 10:27:46 +01:00
Nick Fitzgerald
ad6b223192 Bump to version 0.33.1 2018-02-14 10:33:03 -08:00
Nick Fitzgerald
eb415c7a7c Revert "Bump quote to 0.4"
This reverts commit 6899c275ee.

The `proc_macro2` crate depends on rustc internal crates, which means that
`bindgen` would need to be run under `rustup`.

We can follow https://github.com/rust-lang/rust/issues/47931 to get updates on
when this issue might be resolved and we can update `quote` again.

Fixes #1248
2018-02-14 10:31:50 -08:00
Bastien Orivel
437cd73fcc Update log to 0.4 and bump version 2018-02-13 14:43:18 +01:00
Emilio Cobos Álvarez
b16e09ce55
Minor version bump. 2018-01-26 23:05:53 +01:00
Bastien Orivel
6899c275ee Bump quote to 0.4 2018-01-23 00:40:19 +01:00
Emilio Cobos Álvarez
a46810571a
Minor version bump.
Closes #1231.
2018-01-22 11:40:58 +01:00
Nick Fitzgerald
2e969a4216 Bump to 0.32.1 minor release 2017-12-18 13:18:49 -08:00
Nick Fitzgerald
1110a968f7 Bump to 0.32.0 2017-12-08 11:00:23 -08:00
Bastien Orivel
5c7b7afe82 Update lazy_static to 1.0 2017-12-07 20:56:15 +01:00
Emilio Cobos Álvarez
1554388426
Bugfix version bump. 2017-10-31 18:56:16 +01:00
Emilio Cobos Álvarez
92d7bb3f86
Minor version bump. 2017-10-30 11:50:49 +01:00
Emilio Cobos Álvarez
fefbbb56ec
Minor version bump.
Only bugfixes have landed since the last release (#1112 and #1114), apart from
doc fixes.
2017-10-28 14:55:26 +02:00
Nick Fitzgerald
849c41de2a Bump to version 0.31.0 2017-10-27 11:08:00 -07:00
Bastien Orivel
80a0e4abd8 Update clang-sys to 0.21 and bump version 2017-10-11 23:34:08 +02:00
Nick Fitzgerald
61743aa190 Use quote instead of syntex for Rust code generation
The `syntex` crate is unmaintained. It is slow to build, and additionally it
requires that we pre-process `src/codegen/mod.rs` before we build the `bindgen`
crate.

The `quote` crate provides similar quasi-quoting functionality, is maintained,
and builds faster. It doesn't have a typed API or builders, however; it only
deals with tokens.

Before this commit:

```
$ cargo clean; cargo build
<snip>
    Finished dev [unoptimized + debuginfo] target(s) in 98.75 secs
```

After this commit:

```
$ cargo clean; cargo build
<snip>
    Finished dev [unoptimized + debuginfo] target(s) in 46.26 secs
```

Build time is cut in half! But what about run time?

Before this commit:

```
Generated Stylo bindings in: Duration { secs: 3, nanos: 521105668 }
```

After this commit:

```
Generated Stylo bindings in: Duration { secs: 3, nanos: 548797242 }
```

So it appears to be about 20ms slower at generating Stylo bindings, but I
suspect this is well within the noise.

Finally, this also lets us remove that nasty `mem::transmute` inside
`bindgen::ir::BindgenContext::gen` that was used for the old `syntex`
context. Now `BindgenContext` doesn't have a lifetime parameter either. This
should make it easier to revisit doing our analyses in parallel with `rayon`,
since that context was one of the things that made it hard for `BindgenContext`
to implement `Sync`.

Fixes #925
2017-09-07 10:52:31 -07:00
Richard Bradfield
3cbdb9894c Bump version to 0.30.0 2017-08-26 23:25:03 +01:00
Emilio Cobos Álvarez
ed5f5985d8
Recursively include src files, since Cargo pattern-matching changed. 2017-08-17 16:11:49 +02:00
Bastian Köcher
170f4f57cc Adds support for running rustfmt on generated bindings
This patch enables bindgen to run rustfmt on generated bindings. Rustfmt is used
from the global PATH. Two new command-line arguments are added:
1. --format-bindings: Enables running rustfmt
2. --format-configuration-file: The configuration file for rustfmt (not required).
2017-08-14 18:34:53 +02:00
Xidorn Quan
25ff9dc680 Only include necessary files in package 2017-08-14 09:18:44 +10:00
Emilio Cobos Álvarez
05b1550f04
Major version bump. 2017-07-28 01:33:07 +02:00
Nick Fitzgerald
1baf7dc1c8 s/servo/rust-lang-nursery/ \o/
Fixes #852
2017-07-25 16:32:13 -07:00
Manish Goregaokar
d4da81a5b6 Bump to 0.28.0 2017-07-24 13:28:39 -07:00
Emilio Cobos Álvarez
96304f90a4
Breaking version bump. 2017-07-10 23:16:59 +02:00
Emilio Cobos Álvarez
1bf0b8a40b
Minor version bump to grab clang-sys bump. 2017-07-04 14:34:15 +02:00
Shing Lyu
ee478a123e Passing additional clang arguments for Linux 32 cross compiling 2017-07-04 10:09:53 +08:00
Nick Fitzgerald
2000177d0b Minor version bump to 0.26.2 2017-06-22 09:37:19 -07:00
Emilio Cobos Álvarez
30dc9daa7a
Minor bump. 2017-06-20 23:10:29 +02:00
Emilio Cobos Álvarez
8470e221f9
Breaking version bump. 2017-06-20 12:56:36 +02:00
Emilio Cobos Álvarez
7faa855d01
Version bump to get insta-published. 2017-06-15 19:49:13 +02:00
Emilio Cobos Álvarez
851c571d8b
Bump version number. 2017-06-14 13:04:54 +02:00
Emilio Cobos Álvarez
7f5c594f51
Prevent cargo from packaging orig files. 2017-06-02 16:52:26 +02:00
Emilio Cobos Álvarez
7abf375622
Minor version bump. 2017-05-27 02:28:58 +02:00
Nick Fitzgerald
e97d041a99 Bump to version 0.25.2 2017-05-25 10:34:47 -07:00
Nick Fitzgerald
dc090123d3 Allow asserting expectations across different libclang versions
Rather than having a tests that we only run if libclang >= 3.9, this makes the
test suite dynamically detect when we have different expectations for different
libclang versions. It does this by adding `tests/expectations/tests/libclang-$VERSION`
directories, and `testing_only_libclang_$VERSION` features that are consulted
when the usual expectation file does not exist.

Fixes #697
2017-05-25 09:19:19 -07:00
Emilio Cobos Álvarez
e7978c51e1
Minor version bump to peek up clang-sys updates in stylo.
This should fix https://bugzilla.mozilla.org/show_bug.cgi?id=1365488
2017-05-20 10:54:40 +02:00
bors-servo
cabfac71fc Auto merge of #704 - fitzgen:bitfields-into-ir, r=emilio
Move bitfields into the IR

This PR moves bitfields and the computation of their allocation units into the IR. They were previously computed on-the-fly during code generation. In addition to breaking up and compartmentalizing a portion of the gargantuan `CodeGeneration` implementation for `CompInfo`, this paves the way for adding const-fn bitfield unit constructors.

Also some improvements to `tests/test-one.sh`.

Also some graphviz output improvements that got tangled up in the last commit without a good way to pull them out into their own commit (sorry).

r? @emilio
2017-05-18 15:02:13 -05:00
Nick Fitzgerald
c5f9f3ef23 Move bitfields into the IR
This commit moves bitfields and the computation of their allocation units into
the IR. They were previously computed on-the-fly during code generation. In
addition to breaking up and compartmentalizaing a portion of the gargantuan
`CodeGeneration` implementation for `CompInfo`, this paves the way for adding
const-fn bitfield unit constructors.
2017-05-18 13:00:08 -07:00
Kyle Mayes
abe5d89c6a Bump clang-sys version to 0.18.0 2017-05-17 13:32:07 -04:00
Emilio Cobos Álvarez
31e440917c
codegen: Make phantom fields public.
Otherwise you can't construct structs outside of the bindings file, which is
breaking.

Also, given the previous change was breaking and I didn't notice, I yanked
0.24.1.
2017-05-08 23:45:26 +02:00
Emilio Cobos Álvarez
b40f9f06dc
Bump version. 2017-05-08 23:01:19 +02:00
Kyle Mayes
a33fb570da Bump clang-sys to 0.17.0 2017-05-08 12:46:09 -04:00
Emilio Cobos Álvarez
705f16a314
Breaking version bump. 2017-05-03 22:14:03 +02:00