Commit Graph

3312 Commits

Author SHA1 Message Date
Ryan Zoeller
bf61569d30 Document clang installation method on Fedora 2021-04-06 11:10:01 +02:00
Corey Farwell
89baa2cf04 Fix 0.58.0 release date 2021-04-05 18:35:26 +02:00
Corey Farwell
b5e6eb1cb2 Reference aarch64 issue in the changelog. 2021-04-03 13:19:09 +02:00
Emilio Cobos Álvarez
d7ba7d1dcb
v0.58.0 2021-04-03 13:16:10 +02:00
Emilio Cobos Álvarez
4faaf9a5f3 codegen: Deal with overloads in method code generation.
Fixes #2019
2021-04-03 13:05:04 +02:00
Emilio Cobos Álvarez
b21086cc3b codegen: Don't use a sym temporary in dynamic library code.
Fixes #2014.
2021-04-03 13:05:04 +02:00
Dr. Chat
2605da86c8 remove old comment 2021-04-03 12:24:15 +02:00
Dr. Chat
c8c20a6c8b Deduplicate dyngen code 2021-04-03 12:24:15 +02:00
Dr. Chat
75eaaa6b61 Remove DynamicItems::has_required 2021-04-03 12:24:15 +02:00
Dr. Chat
2c5a1ea6b1 Add a flag to ensure all symbols are resolved when a library is loaded 2021-04-03 12:24:15 +02:00
Mehmet Oguz Derin
e0157a648f From Nullablibility to Nullability
A basic fix
2021-03-29 15:27:20 +02:00
Emilio Cobos Álvarez
4fef50331a
docs: Remove IRC reference.
For now point to #rust:mozilla.org. If that gets too much
bindgen-related traffic we can create an specific room for it.

Closes #2012
2021-03-29 14:00:05 +02:00
Emilio Cobos Álvarez
de94b48756
Merge pull request #2007 from jethrogb/jb/issue-1454-alt
Add callback to check derives for blocklisted types
2021-03-22 20:07:03 +01:00
Wang, Chi
5a055fde1d
Add from_library for generated dynamic library structs (#2011) 2021-03-22 20:04:59 +01:00
Jethro Beekman
0780f804a8 Add callback to check derives for blocklisted types
Fixes #1454 #2003
2021-03-22 12:10:28 +01:00
Jethro Beekman
2a46e29242 Use original name when checking allowlist for anonymous enum variants 2021-03-22 12:05:11 +01:00
Jethro Beekman
af98fd47c7 Add test infrastructure for ParseCallbacks 2021-03-22 12:05:11 +01:00
Jethro Beekman
dedbea5bc0 Add option to translate enum integer types to native Rust integer types
Fixes #430
2021-03-14 09:37:26 +01:00
Emilio Cobos Álvarez
fb931bd6c1
Revert "Add flag to ignore type blocklist when computing derive information"
This reverts commit 7286c815f8, because it
was not intended to be merged after all, see
https://github.com/rust-lang/rust-bindgen/pull/2003#issuecomment-796160427.
2021-03-11 12:52:18 +01:00
Jethro Beekman
7286c815f8 Add flag to ignore type blocklist when computing derive information
Fixes #1454
2021-03-11 12:36:52 +01:00
Jethro Beekman
af87a859ac Fix typo in roundtrip test error message 2021-03-11 12:36:52 +01:00
ldm0
84c702036e Remove outdated comments 2021-03-09 13:16:12 +01:00
Fenhl
650732cd22 Upgrade to shlex 1 2021-02-21 19:30:43 +01:00
Marcel Hlopko
0e25962c4e Rename whitelist -> allowlist and blacklist -> blocklist
For the commandline arguments I added undocumented aliases to old flags,
to stay backwards compatible.
2021-02-18 17:25:13 +01:00
Emilio Cobos Álvarez
e59aa9218b tests: Guess modern libclang version when we fail to parse a version.
Should fix the test failures described in #1991 and #1975 on modern Mac.
2021-02-15 14:06:29 +01:00
Marcel Hlopko
e92dcf2a3f Make clang version parsing logic more robust
Previously the function assumed that the version number appeared in the
third word. This PR adds a heuristic - take the first word that starts
with a number.

This way we can also parse: `debian clang version 11.0` that my clang
reports.
2021-02-15 14:04:52 +01:00
Saleem Rashid
b1c4178826 Run tests on AArch64 using Debian multiarch and QEMU 2021-02-08 13:29:31 +01:00
Saleem Rashid
704c02b579 Revert "Run tests on AArch64"
This reverts commit 0f8ceb68fd.
2021-02-08 13:29:31 +01:00
Corey Farwell
04c653b665 Fix heading level 2021-02-08 11:59:47 +01:00
Emilio Cobos Álvarez
8ac787a9b4 codegen: Track union layout more accurately.
Instead of always generating the _bindgen_union_align method (which
shouldn't be needed at all for Rust structs, since the struct layout
tracker already deals with adding repr(align) as necessary) make sure to
visit all fields appropriately to generate the correct alignment.
2021-02-07 23:10:28 +01:00
Aaron Miller
17476e9f4e OpenBSD requirements 2021-02-07 20:31:03 +01:00
Corey Farwell
0f8ceb68fd Run tests on AArch64 2021-02-04 16:46:38 +01:00
Emilio Cobos Álvarez
43a05656ae
Fix changelog (run doctoc, plus we're in 2021 already) 2021-02-01 14:08:28 +01:00
Emilio Cobos Álvarez
5ca2fc7a02 v0.57.0 2021-02-01 14:06:00 +01:00
Corey Farwell
c509ef12ac Add failing regression test for #1973. 2021-01-30 16:48:20 +01:00
Weston Carvalho
e0f06c7fb2 Generate fields as non-pub if they would be access restricted in C++. 2021-01-29 13:18:25 +01:00
Andrey Pushkar
51778893c4
Use absolute paths for unsaved files passed to clang and prepend -include directives to them.
Fixes #1771
Closes #1857
2021-01-10 15:39:20 +01:00
Eric Huss
9de0d64fc0 Update mdbook 2021-01-04 19:20:04 +01:00
Emilio Cobos Álvarez
922655f336 ci: update mdbook. 2020-12-26 23:19:33 +01:00
Emilio Cobos Álvarez
8945fa637e
book: Touch the book to ensure that GH actions deploy works. 2020-12-26 23:04:09 +01:00
Emilio Cobos Álvarez
faf8b3edba ci: Move the remaining CI tasks (updating the book) to GitHub actions. 2020-12-26 20:46:42 +01:00
Emilio Cobos Álvarez
fde75f68e7 ci: Switch most CI to GitHub actions. 2020-12-26 19:01:53 +01:00
Emilio Cobos Álvarez
afa50fa1ad tests: Remove unnecessary system header include that makes macos unhappy 2020-12-26 19:01:53 +01:00
Emilio Cobos Álvarez
a0cd041415 integration: Forward some features to bindgen. 2020-12-26 19:01:53 +01:00
Emilio Cobos Álvarez
c5f1c73be3 Allow log stubs to be unused. 2020-12-26 19:01:53 +01:00
Emilio Cobos Álvarez
669dc1b628 comp: Fix bitfields to allow underaligned fields after them to take padding space.
Fixes #1947.

There are two separate issues here: First, the change in comp.rs ensures
that we don't round up the amount of storage to the alignment of the
bitfield. That generates the "expected" output in #1947
(`__BindgenBitfieldUnit<[u8; 3], u16>`).

But that's still not enough to fix that test-case because
__BindgenBitfieldUnit would be aligned and have padding, and Rust won't
put the extra field in the padding.

In order to ensure the bitfield starts at the right alignment, but that
Rust can put stuff in the extra field, we need to make a breaking change
and split the generated fields in two: One preceding that guarantees
alignment, and the actual storage, bit-aligned.

This keeps the existing behavior while fixing that test-case.
2020-12-20 21:29:47 +01:00
Emilio Cobos Álvarez
98841b32ed context: Escape the dyn keyword properly.
Fixes #1946
2020-12-20 20:36:03 +01:00
Emilio Cobos Álvarez
4ce4b934fd tests: Add another fit-macro-constant-types test. 2020-12-19 19:28:24 +01:00
Emilio Cobos Álvarez
5c821867f2 var: Avoid a bit of duplication with fit_macro_constants. 2020-12-19 19:28:24 +01:00
Antoni Simka
ea4164c85c Add option to fit macro consts into smaller types
Add a `--fit-macro-constant-types` option to make bindgen try to fit
macro integer constants into types smaller than u32/i32.
Useful especially when dealing with 8/16-bit architectures.

Closes #1945
2020-12-19 19:28:24 +01:00