summaryrefslogtreecommitdiff
path: root/mesonbuild/modules/rust.py
AgeCommit message (Collapse)Author
2023-10-20modules/rust: remove missed cargs.extend()Dylan Baker
2023-10-17modules/rust: only use include and define args from global/project argsDylan Baker
2023-10-16modules/rust: remove rust_crate_type for test() methodDylan Baker
This is required to test non-executable targets when they set an explicit type.
2023-10-09build: Use typed_kwargs for language argsDylan Baker
This also moves the repacking into the interpreter, making the build implementation simpler and removing a layering violation. This also makes use a defaultdict to remove the need to call `.get()`
2023-09-27interpreter: annotate build_target functionDylan Baker
This uses an overload to try to get more accurate information from the function.
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-09-19Rust: Add a rust.proc_macro() methodDylan Baker
2023-08-18Add more descriptive description to CustomTargetCharles Brunet
Allow modules using CustomTarget to modify the command description used by ninja backend. This result in more precise logs when building a project.
2023-07-19move various bits of type-checking only code to TYPE_CHECKING blocksEli Schwartz
Mostly detected with flake8-type-checking. Also quote T.cast() first arguments, since those are not affected by future annotations.
2023-07-05Merge pull request #11742 from xclaesse/link-whole-casesJussi Pakkanen
Fix niche cases when linking static libs
2023-06-27modules/rust: Add a keyword argument to pass extra args to the rust compilerDylan Baker
This may be necessary to, for example, stop rustc complaining about unused functions
2023-06-27modules/rust: Add a machine file property for extra clang args with bindgenDylan Baker
It's currently impossible to inject extra clang arguments when using bindgen, which is problematic when cross compiling since you may need critical arguments like `--target=...`. Because such arguments must be passed after the `--` it's impossible to inject them currently without going to something like a wrapper script. Fixes: #11805
2023-06-27modules/rust: Add a `link_with` kwarg to the test methodDylan Baker
This was requested by Mesa, where a bunch of `declare_dependency` objects are being created as a workaround for the lack of this keyword
2023-05-01build: Don't do a deep copy of kwargsXavier Claessens
It seems to only be used by the Rust module now, and it already does a copy.
2023-04-21modules/rust: Add -DNDEBUG to bindgen if b_ndebug is falseDylan Baker
Otherwise bindgen may generate different behavior than the compiled C code actually has.
2023-03-04typed_kwargs: Extend since_values and deprecated_values for typesXavier Claessens
2023-02-01treewide: add future annotations importEli Schwartz
2023-01-10modules/rust: Fix annotation for _bindgen_binDylan Baker
Which suffers from the same issue as the gnome module
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: Use `__future__.annotations`Dylan Baker
2022-12-05modules/rust: use the shared DEPENDENCIES_KWDylan Baker
2022-12-05modules/rust: Add support for string include_directoriesDylan Baker
Which we support for basically every other case, but not this one.
2022-12-05interpreter: move TEST_KW from interpreter.py to type_checking.pyDylan Baker
Since it's also used in the rust module, it should be in a common place. Also rename from `TEST_KWARGS` to `TEST_KWS`, which is more in line with the `*_KW` naming scheme used in the type_checking module.
2022-11-19modules/rust: stabilizeDylan Baker
Mesa is using the rust module in production, so we should stabilize it.
2022-11-17modules/rust: Also include generated sources for testsDylan Baker
When we create a test from a non-executable, we weren't copying the generated sources, just the static ones.
2022-10-03pylint: enable unnecessary-comprehensionDylan Baker
2022-08-26Fix indentation issues reported by flake8, requiring code restructuringAlf Henrik Sauge
Strictly speaking code restructuring isn't needed, but making this PEP8 compliant results in indentation of the code that reduces the readability. By moving the offending code on the outside of the method call, the readability is maintained.
2022-08-17interpreter: move handling of module stability to interpreterDylan Baker
Thanks to `ModuleInfo`, all modules are just named `foo.py` instead of `unstable_foo.py`, which simplifies the import method a bit. This also allows for accurate FeatureNew/FeatureDeprecated use, as we know when the module was added and if/when it was stabilized.