aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
AgeCommit message (Collapse)AuthorFilesLines
2021-08-20external-project: Add support for WAF build systemXavier Claessens2-27/+44
Fixes: #7638
2021-08-19Merge pull request #9126 from dcbaker/submit/rust-use-full-typingJussi Pakkanen2-31/+39
Fully type check rust.bindgen
2021-08-18modules/qt: Allow using generated sources for compile_translations ts_filesDylan Baker1-4/+11
2021-08-18modules/qt: Allow Generated sources in compile_resourcesDylan Baker1-28/+48
2021-08-18modules/qt: allow passing generated targets to compile_uiDylan Baker1-2/+9
2021-08-18modules/qt: Allow generated sources for arguemnts to compile_mocDylan Baker1-4/+18
2021-08-18interpreter: fix overload for `source_strings_to_files`Dylan Baker1-0/+3
2021-08-18python module: fix extensions without explicit subdir being installed to libdirEli Schwartz1-4/+4
They are documented to go in site-packages, and indeed belong there. Regression from the initial implementation via commit ad296976f079cd185ab7361e3e4b18c6bf684090 Fixes #6331
2021-08-18python module: make external program wrapper have access to useful metadataEli Schwartz1-26/+35
Basically just reorganize code. Try to make it a little neater, while we're at it.
2021-08-18Fix incorrect .name attribute for python programEli Schwartz1-3/+4
It is always set to python3 even if we asked for python2...
2021-08-18fix some confusingly indirect codeEli Schwartz1-3/+3
rsplit(..., 1) always produces exactly one split, by design, there's no need to then join a 1-element list via a generator comprehension after extracting the end of it via pop. If this commit message sounds confusing, then so was I when trying to figure out what this actually did and if it needed extracting to PythonExternalModule.
2021-08-18backends/ninja: write depscan input files to jsonDylan Baker2-13/+24
Currently, we write each file to the command line, but this can result in situations where the number of files passed exceeds OS imposed command line limits. For compilers, we solve this with response files. For depscan I've chosen to use a JSON list instead. JSON has several advantages in that it's standardized, there's a built-in python module for it, and it's familiar. I've also chosen to always use the JSON file instead of having a heuristic to decide between JSON and not JSON, while there may be a small performance trade off here, keeping the implementation simple with only one path is wort it. Fixes #9129
2021-08-17rust targets: lld-link is the same as link for static libsNirbheek Chauhan1-3/+3
Without this, rustc will fail to find libfoo.a; same as with MSVC.
2021-08-17Add install tagsXavier Claessens12-51/+131
Fixes: #7007.
2021-08-16compilers/compilers: Fix some potential issues spotted by pyrightDylan Baker1-2/+4
There are two changes here, one is to remove an `elif` that is effectively an `else`, that helps the type checker and provides a small speedup potentially. The second is a potentially unbound variable, that currently isn't hit, but very much could be.
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-16compilers: Fix extra_args parameterDylan Baker6-31/+36
which can also be a callable taking a CompileChekcMode as an argumetn and returning a list of strings.
2021-08-16compilers: Fix annotations for run and cached_compileDylan Baker3-9/+9
Which absolutely should accept `str | File`, but the annotations claim that only strings are accepted.
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-08-16interpreterobjects: Add TypedDict annoations for `extract_search_dirs`Dylan Baker2-1/+11
This allows for more accurate type checking
2021-08-16interperterbase: help type checkers do better type deductionDylan Baker1-1/+5
This assert causes several type checkers (both mypy and pyright) to force `obj` to be a base `HoldableObject` instead of the specialized object. Since the check itself may still be valuable as we don't have fully type annotation coverage it's simply been removed when type checking to aid in type specialization.
2021-08-16interpreter: allow KwargInfo.evolve to change the name as wellDylan Baker1-1/+2
2021-08-16modules/rust: fix initialize signatureDylan Baker1-2/+2
So that it's accurate, and we don't need to use to use `#type: ignore` declaration
2021-08-16modules/rust: use typed_kwargs for bindgenDylan Baker1-29/+34
This was the only function left in here that wasn't fully typed, so let's fix that
2021-08-16interpreter: fix `source_strings_to_files` annotationsDylan Baker1-0/+3
It's missing a required overload declaration
2021-08-16Add unset_variable()Tristan Partin3-1/+13
This should be useful for helping to control variable scope within Meson. CMake has something similar for controlling scope.
2021-08-16interpreter: Fix holder_map not being updated when subproject failsXavier Claessens1-6/+5
Fixes: #9038
2021-08-15Refresh Ninja cache files on regeneration.Jussi Pakkanen1-0/+3
2021-08-15editorconfig: add setting to trim trailing whitespaceEli Schwartz4-19/+17
and clean up all outstanding issues Skip 'test cases/common/141 special characters/meson.build' since it intentionally uses trailing newlines.
2021-08-15correct a copy-pasted commentEli Schwartz1-2/+1
2021-08-15Revert "interpreter: Fix holder_map not being updated when subproject fails"Jussi Pakkanen1-5/+6
This reverts commit 566383c727219fc20cf1c90c0fe7dae4bcac5c96.
2021-08-15Revert "compilers/c++: Add MSVC option to make the __cplusplus define accurate"Jussi Pakkanen1-11/+0
This reverts commit 0b97d585480e973d8b149618901f7a4ddfa1a906.
2021-08-11Always generate Java rule, it is platform agnostic.Jussi Pakkanen1-2/+1
2021-08-11compilers/c++: Add MSVC option to make the __cplusplus define accurateDylan Baker1-0/+11
Otherwise it always returns the value for c++98, starting with MSVC 2017 15.7 or later. Earlier versions are not affected by this mis-feature
2021-08-09build: store global and project args per-machine even when not cross compilingDylan Baker1-8/+4
The problem is what happens in this case: ```meson add_project_arguments('-DHOST', language : 'c', native : false) add_project_arguments('-DBUILD', langauge : 'c', native : true) ``` The original meson behavior was that in an host == build configuration only the `native : false` would be applied. This doesn't really make sense as in that case the build machine is the host machine, so it is both the native and non-native machine at once. We changed this so that the both would be applied in a host == build configuration, but this is a behavioral change, and needs to be reverted. Fixes: #9037
2021-08-09build: add a few annotationsDylan Baker1-4/+4
I was debugging this code, these were trivial, so I added them.
2021-08-09Fix i18n target name when using @BASENAME@ and configure_file() inputXavier Claessens1-12/+12
Fixes: #9022
2021-08-09i18n: use real build/install targets for gmo filesEli Schwartz2-51/+23
Don't just create a .PHONY target which runs a script that magically generates files ninja doesn't know about. It results in untracked files, and `meson install` has to run additional commands instead of copying over files, and then cannot track them to uninstall them later. I'm not even really sure why it was originally done via a proxy script, most likely bad legacy design. This is after all one of the oldest modules... One side effect of this is that meson doesn't know how to rename build.CustomTarget files on install (only data files are supported?), and every file needs to be installed as "domainname.mo" so it must be named that in-tree too. To prevent clashes, every locale gets its own locale-specific subdirectory. Once we are doing that anyway, we can output them to the actual structure required by the gettext family of functions, and bindtextdomain() can therefore point to this location if desired. This might be useful for running localized programs from the build tree.
2021-08-09interpreter: Fix spurious warning in configure_data()Xavier Claessens1-2/+2
This is a regression when porting to typed_pos_args().
2021-08-09gnome: Filter all compiler and linker flagsEmmanuele Bassi1-7/+13
When sending them to the introspection scanner, we must always filter all compiler and linker flags, because g-ir-scanner does not accept any random argument but only a specific subset. Fixes: #8876
2021-08-09Fix native targets for vs backend cross compilationGustavoLCR1-10/+40
2021-08-09interpreter: Fix missing subsubproject summary when subproject failsXavier Claessens1-3/+4
In the case main->subp->subsubp, if subsubp succeed to configure but subp subsequentially fails, subsubp is still being built but its summary was missing.
2021-08-09interpreter: Fix holder_map not being updated when subproject failsXavier Claessens1-12/+8
Fixes: #9038
2021-08-09modules: Fix typo in state.test()Xavier Claessens1-1/+1
Fixes: #9081
2021-08-09pkg-config: support for `-l:libfoo.a`lilinzhe1-0/+24
fixs: #9000 Meson not correctly process with -l:xxx.a link arguments in pkgconfig .pc file. see also:https://stackoverflow.com/questions/48532868/gcc-library-option-with-a-colon-llibevent-a with unit test, unit test will be partially skiped if pkg-config version < 0.28 . see: https://gitlab.freedesktop.org/pkg-config/pkg-config/-/blob/master/NEWS
2021-08-09interpreter: Fix list contains for Holders (fixes #9020 #9047)Daniel Mensinger1-2/+2
2021-08-08Add support for finding Javascript source libraries with Emscripten.Jussi Pakkanen2-1/+36