summaryrefslogtreecommitdiff
path: root/test cases/rust/12 bindgen
AgeCommit message (Collapse)Author
2025-10-20Fix typos in authorship informationVlad-Stefan Harbuz
2025-08-25fix transient failure on rust/12 bindgenPaolo Bonzini
The test has a custom .h target that has the same name as the input in the test's source directory. Sometimes a compiler could build a target that intends to use the file in the source tree, but finds an incomplete output of the custom_target, causing the test to fail. To fix this, move the generated headers in a subdirectory of the build tree. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-07-15test/rust: Replace gcc -m argument with a -f argumentDylan Baker
-m arguments aren't portable across architectures. -fipa-pta will hopefully be portable for GCC, but also not implemented by clang. Fixes: #13417
2024-04-15tests: fix missing dependency causing flaky build failureEli Schwartz
We have two copies of other.h, one of which is generated. If we don't include the include/ directory then building fails unless the custom_target which copies it over, happens to run early enough. On parallel builds this may fall on its face.
2024-02-24add test for generating static inline wrappersKarol Herbst
2024-02-23modules/rust: allow setting a version constraint on bindgenDylan Baker
This allows us to ensure that the bindgen we're using is suitable for our purpose.
2024-02-23modules/rust: inject a C/C++ standard for bindgenDylan Baker
Especially for C++ this is very important.
2024-02-23modules/rust: Allow explicitly setting the language to bindDylan Baker
This may be of particular use when a header is .h but should be treated as a C++ header instead of a C header.
2024-02-23rust/bindgen: Use Meson rules for C++ headersDylan Baker
Bindgen natively only considers .hpp to be C++ headers, but Meson considers some additional extensions including .hh and .hxx to be C++.
2023-12-13Use SPDX-License-Identifier consistentlyDylan Baker
This replaces all of the Apache blurbs at the start of each file with an `# SPDX-License-Identifier: Apache-2.0` string. It also fixes existing uses to be consistent in capitalization, and to be placed above any copyright notices. This removes nearly 3000 lines of boilerplate from the project (only python files), which no developer cares to look at. SPDX is in common use, particularly in the Linux kernel, and is the recommended format for Meson's own `project(license: )` field
2023-10-20modules/rust: Add a test that bindgen drops arguments it shouldn't useDylan Baker
This does require hacking up the test pretty badly, since we need to not ever pass GCC these invalid values. But it's preferable to writing another project test I think. Co-Authored-by: Nirbheek Chauhan <nirbheek@centricular.com>
2023-09-25rust: apply global, project, and environment C args to bindgenDylan Baker
This means that arguments set via `add_global_arguments`, `add_project_arguments` and by either the `-Dc_args` or `CFLAGS` are applied to bindgen as well. This can be important when, among other things, #defines are set via these mechanisms. Fixes: #12065
2023-04-04propagate the most accurate node to error messagesEli Schwartz
During evaluation of codeblocks, we start off with an iteration of nodes, and then while evaluating them we may update the global self.current_node context. When catching and formatting errors, we didn't take into account that the node might be updated from the original top-level iteration. Switch to formatting errors using self.current_node instead, to ensure we can point at the likely most-accurate actual cause of an error. Also update the current node in a few more places, so that function calls always see the function call as the current node, even if the most recently parsed node was an argument to the function call. Fixes #11643
2023-03-28test cases: make various things werror-safeEli Schwartz
Allows getting closer to `./run_project_tests.py -- -Dwerror=true`. - when argc and argv are not *both* used, there's a standard, compliant mechanism to mark the variable as unused - generated code should not build as -Werror - more thoroughly comment out some commented code
2023-03-04typed_kwargs: Extend since_values and deprecated_values for typesXavier Claessens
2022-12-05modules/rust: Add support for dependencies in bindgenDylan Baker
This is needed for cases where we need external C headers, which are passed to clang.
2022-12-05modules/rust: Add support for string include_directoriesDylan Baker
Which we support for basically every other case, but not this one.
2021-10-30Added warning if run_command is called without the check kwargVolker Weißmann
2021-02-06rust: Add a module wrapper for bindgenDylan Baker
This has a couple of advantages over rolling it by hand: 1. it correctly handles include_directories objects, which is always handy 2. it correctly generates a depfile for you, which makes it more reliable 3. it requires less typing