summaryrefslogtreecommitdiff
path: root/mesonbuild/backend/backends.py
Commit message (Collapse)AuthorAgeFilesLines
* allow passing a CustomTargetIndex as argument to a testPaolo Bonzini2021-12-061-3/+5
| | | | | Fixes: #7585 Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* pass all outputs of a custom_target as arguments to a testPaolo Bonzini2021-12-061-12/+19
| | | | | | | Meson was passing only the first output and warning about it. To do this easily, refactor construct_target_rel_path to return a list. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* Fix performance regression in build file generationcomplexoctonion2021-12-061-1/+2
| | | | | | Re-use any already determined rpaths for a target. Fixes #9695
* rename exe_runner to exe_wrapper everywhereEli Schwartz2021-12-051-3/+3
| | | | I don't understand the purpose of this confusing API naming split.
* add install_symlink functionPablo Correa Gómez2021-12-011-0/+20
| | | | | | Allows installing symlinks directly from meson, which can become useful in multiple scenarios. Current main use is to help moving forward #9557
* fix BSD ldconfig handling (#9631)Eli Schwartz2021-11-281-1/+3
| | | | | | | | | | For libraries installed to libdir, it's not expected to have rpath hooked up. But for non-default libdirs, the path might not get searched by default. `ldconfig -m <libdir>` is convenient here, as it will programmatically add a new directory to search for shared libraries, so the resulting installed programs work out of the box. Include the dragonfly BSD platform name, which doesn't match the 'bsd' catch-all pattern.
* backends/backends: recurse when looking for paths in bundled shared librariesDylan Baker2021-11-241-0/+3
| | | | | | | | This previously worked because we were accidentally doing this via mutation. However, doing this via mutation is not a good way to do it, we should be explicit. Fixes #9542
* build|backend: Fix some type annotationsDylan Baker2021-11-241-7/+11
| | | | | These currently say the take `Target`, but the really take `BuildTarget | CustomTarget | CustomTargetIndex`.
* backends/backends: fix typo in commentDylan Baker2021-11-241-1/+1
|
* Support Visual Studio 2022 backendCrend King2021-11-211-0/+3
|
* Make environment objects hash deterministically.Jussi Pakkanen2021-10-291-3/+8
|
* add install_emptydir functionEli Schwartz2021-10-081-0/+15
| | | | | | | | | | | | | | | | | | | | This replaces the absolute hack of using ``` install_subdir('nonexisting', install_dir: 'share') ``` which requires you to make sure you don't accidentally or deliberately have a completely different directory with the same name in your source tree that is full of files you don't want installed. It also avoids splitting the name in two and listing them in the wrong order. You can also set the install mode of each directory component by listing them one at a time in order, and in fact create nested structures at all. Fixes #1604 Properly fixes #2904
* fix extra whitespaceEli Schwartz2021-10-041-1/+0
| | | | discovered via flake8 --select E303
* build: use an object rather than a dict for the dep_manifestDylan Baker2021-09-241-1/+2
| | | | | | | | This really is more of a struct than a dict, as the types are disjoint and they are internally handled, (ie, not from user input). This cleans some things up, in addition I spotted a bug in the ModuleState where the dict with the version and license is passed to a field that expects just the version string.
* Fix ignored install_tag kwarg in install_subdir()Xavier Claessens2021-09-161-1/+1
| | | | Fixes: #9263
* mintro: add installed_planFilipe Laíns2021-09-061-28/+48
| | | | Signed-off-by: Filipe Laíns <lains@riseup.net>
* run_target: do not yield broken names with subdirsEli Schwartz2021-09-011-1/+4
| | | | | | | A run_target object created in a subdir/meson.build always has a ninja rule name of "name", not "subdir/name". Fixes #9175
* pylint: turn on superflous-parensDylan Baker2021-08-311-7/+7
| | | | | | | | We have a lot of these. Some of them are harmless, if unidiomatic, such as `if (condition)`, others are potentially dangerous `assert(...)`, as `assert(condtion)` works as expected, but `assert(condition, message)` will result in an assertion that never triggers, as what you're actually asserting is `bool(tuple[2])`, which will always be true.
* Path special casing for the Xcode backend.Jussi Pakkanen2021-08-211-1/+5
|
* backend/backends: use a TypedDict for introspection dataDylan Baker2021-08-201-1/+11
| | | | | Which is easier to reason about as a human, and narrower, allowing for more accurate type checking.
* backend/backends: Add type annotations to BackendDylan Baker2021-08-201-147/+223
|
* backend/backends: Add verbose to ExecutableSerialisiation initializerDylan Baker2021-08-201-1/+2
| | | | | | | | | There are cases in the backend like this: ```python e = ExecutableSerialisation(...) e.verbose = v ``` setting it from the initializer is cleaner.
* backend/backends: Add type annotations to ExecutableSerilalisationDylan Baker2021-08-201-3/+12
|
* backend/backends: Add type annotations to SubdirInstallDataDylan Baker2021-08-201-1/+2
|
* backend/backends: Add type annotations to TargetInstallDataDylan Baker2021-08-201-3/+6
|
* backend/backends: Add type annotations to CleanTreesDylan Baker2021-08-201-1/+1
|
* backend/backends: add type annotations to RegenInfoDylan Baker2021-08-201-1/+1
|
* backends: remove unused name parameter from as_meson_exe_cmdlineDylan Baker2021-08-201-1/+1
| | | | This parameter isn't used, at all, so just remove it
* backends: move method from ninjabackend to base classDylan Baker2021-08-201-3/+8
| | | | | | The baseclass has code that assumes said method exists, and it really doesn't seem to do anything ninja specific, so move it to the generic backend.
* Add install tagsXavier Claessens2021-08-171-20/+60
| | | | Fixes: #7007.
* Add feed arg to custom_target()Simon Ser2021-06-291-11/+21
|
* fix: Always explicitly set encoding for text files (fixes #8263)Daniel Mensinger2021-06-291-3/+3
|
* build: fix object path for vs backendDenis Fortin2021-06-281-1/+8
|
* Split compiler detection from EnvironmentDaniel Mensinger2021-06-251-2/+2
| | | | | | This moves all the compiler detection logic into the new compilers.detect module. This dramatically reduces the size and complexity of Environment.
* Merge pull request #8884 from dcbaker/submit/type-and-annotate-install-functionsJussi Pakkanen2021-06-231-4/+6
|\ | | | | Add annotations for the various install_* functions
| * install_*: FileMode doesn't need to be NoneDylan Baker2021-06-221-3/+0
| | | | | | | | | | | | There's no reason to allow None into the backend, it already has code to check that all of the values of the FileMode object are None, so let's use that, which is much simpler all the way down.
| * backend: Headers.install_subdir is allowed to be NoneDylan Baker2021-06-221-1/+6
| | | | | | | | But we don't properly handle that.
* | Add Visual Studio 2012/2013 backends (#8803)fanc9992021-06-221-0/+6
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * backends: Add a Visual Studio 2013 backend This is more-or-less a quick port from the VS2015 backend, except that we update the Visual Studio version strings and toolset versions accordingly. Also correct the generator string for Visual Studio 2015 in mesonbuild/cmake/common.py. * backend: Add VS2012 backend Similar to what we did for Visual Studio 2013, add a Visual Studio 2012 backend. * vs2010backend.py: Implement `link_whole:` if needed We actually need Visual Studio 2015 Update 2 to use `/WHOLEARCHIVE:`, which is what we are currently using for `link_whole:` on Visual Studio. For Visual Studio versions before that, we need to expand from the static targets that were indicated by `link_whole:`, and any of the sub-dependent targets that were pulled in via the dependent target's `link_whole:`. This wil ensure `link_whole:` would actually work in such cases. * vs2010backend.py: Handle objects from generated sources Unforunately, we can't use backends.determine_ext_objs() reliably, as the Visual Studio backends handle this differently. * vs2010backend.py: Fix generating VS2010 projects Visual Studio 2010 (at least the Express Edition) does not set the envvar %VisualStudioVersion% in its command prompt, so fix generating VS2010 projects by taking account into this, so that we can determine the location of vcvarsall.bat correctly. * whole archive test: Disable on vs2012/2013 backends too The Visual Studio 2012/2013 IDE has problems handling the items that would be generated from this test case, so skip this test when using --backend=vs[2012|2013]. This test does work for the Ninja backend when VS2012 or VS2013 is used, though. Consolidate this error message with XCode along with the vs2010 backend. * docs: Add the new vs2012 and vs2013 backends Let people know that we have backends for vs2012 and 2013. Also let people know that generating Visual Studio 2010 projects have been fixed and the pre-vs2015 backends now handle the `link_whole:` project option.
* holders: remove unholderDaniel Mensinger2021-06-181-9/+9
|
* backends: fix TestSerialisation.suite annotationsDylan Baker2021-06-141-1/+1
| | | | It's a `str[]` not `str`
* condense linesEli Schwartz2021-06-071-4/+2
|
* more f-strings everywhereEli Schwartz2021-06-071-11/+11
| | | | | pyupgrade didn't catch many .format() methods which were too complex (e.g. multiline or applied to templates rather than string literals)
* use an immutable list for an lru_cached functionsDylan Baker2021-06-021-6/+6
| | | | | | | | | | | | | | | | | | | | When mutable items are stored in an lru cache, changing the returned items changes the cached items as well. Therefore we want to ensure that we're not mutating them. Using the ImmutableListProtocol allows mypy to find mutations and reject them. This doesn't solve the problem of mutable values inside the values, so you could have to do things like: ```python ImmutableListProtocol[ImmutableListProtocol[str]] ``` or equally hacky. It can also be used for input types and acts a bit like C's const: ```python def foo(arg: ImmutableListProtocol[str]) -> T.List[str]: arg[1] = 'foo' # works while running, but mypy errors ```
* Add swift executable support in Xcode.Jussi Pakkanen2021-05-231-0/+6
|
* backends: use a set for processed targets instead of a dictDylan Baker2021-05-191-1/+1
| | | | | We're only interested in the keys, not in the value (which was always set to True), so a set is a better data structure anyway.
* introspection: export all sources for custom targetsJason Francis2021-04-261-0/+2
| | | | Also adds some test cases for source files in target_sources.
* Xcode: make Swift projects work.Jussi Pakkanen2021-04-251-0/+6
|
* Xcode: put all include dirs via a property rather than a cmd line arg.Jussi Pakkanen2021-04-211-2/+6
|
* Xcode: regenerato project file when build conf changes.Jussi Pakkanen2021-04-191-0/+16
|
* Xcode: fix running commands that lie in the build root dir.Jussi Pakkanen2021-04-181-1/+1
|