aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/interpreter/compiler.py
AgeCommit message (Collapse)AuthorFilesLines
2022-05-03dependencies: extract code to get all leaf dependenciesPaolo Bonzini1-14/+1
Extract to a separate function the code that resolves dependencies for compiler methods. We will reuse it for add_project_dependencies(). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-02-09fix UI regression in compiler.compiles loggingEli Schwartz1-1/+1
In commit b30dddd4e5b4ae6e5e1e812085a00a47e3edfcf1, various refactorings were done, during which a kwarg got accidentally dropped from the function that determined part of the log message. As a result, a ':' suddenly appeared in the log message where none should be. Example expected output: Checking if "-Werror=shadow with local shadowing" compiles: YES What actually happened: Checking if "-Werror=shadow with local shadowing" : compiles: YES Fixes #9974
2022-02-06add FeatureNew check for compiler.* methods with dependency on internal depEli Schwartz1-2/+3
In commit 0deab2ee9efc2ffe9e43f2787611e34656e6a304 we added the ability to pass a declare_dependency() to any compiler method that accepts "dependencies", but we never marked the version it is available since. Fixes #9957
2022-01-27flake8: fix indentation styleEli Schwartz1-3/+3
2021-11-28make sure files arguments to compiler.compiles and friends, performs rebuildEli Schwartz1-0/+3
If the compiler check is updated as a string in meson.build, we force rebuild, which is a good thing since the outcome of that check changes the configuration context and can enable or disable parts of the build. If the compiler check came from a files() object then we didn't add a regen rule on those files. Fixes #1656
2021-11-01various manual conversion of percent-formatted strings to f-stringsEli Schwartz1-1/+1
2021-10-10Fix typos discovered by codespellChristian Clauss1-3/+3
2021-10-04f-stringsEli Schwartz1-1/+1
2021-10-04various python neatness cleanupsEli Schwartz1-1/+1
All changes were created by running "pyupgrade --py3-only" and committing the results. Although this has been performed in the past, newer versions of pyupgrade can automatically catch more opportunities, notably list comprehensions can use generators instead, in the following cases: - unpacking into function arguments as function(*generator) - unpacking into assignments of the form x, y = generator - as the argument to some builtin functions such as min/max/sorted Also catch a few creeping cases of new code added using older styles.
2021-10-03docs: Fixes found during the YAML conversion processDaniel Mensinger1-1/+2
2021-09-07interpreter: detect and pass compiler to be used for linker testsPaolo Bonzini1-0/+15
Allow using the links method to test that the C++ driver (e.g. g++) can be used to link C objects. One usecase is that the C compiler's libsanitizer might not be compatible with the one included by the C++ driver. This is theoretically backwards-incompatible, but it should be treated as a bugfix in my opinion. There is no way in Meson to compile a .c file with the C++ driver as part of a build target, therefore there would be no reason to do something like meson.get_compiler(meson.get_compiler('cpp').links(files('main.c')). Fixes: #7703
2021-08-27interpreter: fix cases of `KwargInfo(..., T, default=None)`Dylan Baker1-5/+5
The correct way to mark these is `KwargInfo(..., (T, type(None)))`. There's also a few cases of `(T, None)` which is invalid, as `None` isn't a type
2021-08-27interpreter: Add a helper for checking constrained inputsDylan Baker1-2/+2
This is quite valuable for enum-like inputs, where only a certain set of values is allowed.
2021-08-16interpreter/compiler: make helper methods protectedDylan Baker1-29/+29
2021-08-16interpreter/compiler: Add type checking for the Compiler objectDylan Baker1-394/+347
This adds a full set of `typed_pos_args` and `typed_kwarg` decorations, as well as fixing all of the typing errors reported by mypy.
2021-08-16interpreter/compiler: Add type annotations to TryRunResultHolderDylan Baker1-4/+4
2021-08-16interpreter/compiler: remove unittest_args methodDylan Baker1-16/+3
It's not documented, and it's been marked deprecated for who knows how long.
2021-08-16interpreter/compiler: Replace permittedKwargs({}) with noKwargsDylan Baker1-19/+19
The former isn't really correct, as it wants a set and is getting a dict, the other is also conceptually clearer I think.
2021-06-22interpreter: Replace manual kwarg validation in ↵Laurin-Luis Lehning1-6/+7
compiler.get_supported_arguments with @typed_kwargs
2021-06-21interpreter: Move argument checks from add_*_arguments to ↵Laurin-Luis Lehning1-3/+16
compiler.get_supported_arguments
2021-06-18holders: Fix the remaining code to respect the holder changesDaniel Mensinger1-14/+14
2021-06-18interpreter: Refactor interpreter.compiler to use ObjectHolderDaniel Mensinger1-15/+20
2021-04-01interpreter: Move to its own folder and split itXavier Claessens1-0/+766