summaryrefslogtreecommitdiff
path: root/mesonbuild/backend
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.
* Fix '# Visual Studio <>' comment in sln files with VS backendLuke Elliott2021-11-277-5/+20
| | | | such that Visual Studio Version Selector works.
* Stop backend_startup_project from erasing the last project in a VS solutionLuke Elliott2021-11-251-1/+1
| | | | if it is not the specified project.
* shared_module: Add soname when used as a link targetNirbheek Chauhan2021-11-241-1/+1
| | | | | | | | | | | | | | Emit a detailed deprecation warning that explains what to do instead. Also add a unittest. ``` DEPRECATION: target prog links against shared module mymod, which is incorrect. This will be an error in the future, so please use shared_library() for mymod instead. If shared_module() was used for mymod because it has references to undefined symbols, use shared_libary() with `override_options: ['b_lundef=false']` instead. ``` Fixes https://github.com/mesonbuild/meson/issues/9492
* 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-213-0/+64
|
* Run pylintGustavoLCR2021-11-211-28/+36
|
* Fix vs backend cross compilation regressionGustavoLCR2021-11-211-6/+15
|
* valac dependencies: use the canonical list of vala source namesEli Schwartz2021-11-151-1/+1
| | | | | | | Don't hardcode one of the three possible source types, thus ignoring the needed vapis for dependencies using .gs or .vapi sources. Fixes #9544
* Move language standard in separate method within vsbackendMoroz Oleg2021-11-023-9/+24
|
* Fixes .vcxproj for vs2017 vs2019Олег Мороз2021-11-021-0/+9
| | | | | | fixes #6314 in case of backend is vs2017 or vs2019 place LanguageStandard tag with stdcpp version and LanguageStandard_C tag with stdc version in .vcxproj file
* various manual conversion of percent-formatted strings to f-stringsEli Schwartz2021-11-012-12/+11
|
* fix typoed vs backend tokenEli Schwartz2021-11-011-1/+1
|
* coverage generator: obey the documentation and only generate supported outputsEli Schwartz2021-11-011-26/+34
| | | | | | | | | | | | | We say: > If version 4.2 or higher of the first is found, targets coverage-text, > coverage-xml, coverage-sonarqube and coverage-html are generated. But this is totally untrue. Make it true, by actually checking (and not generating broken coverage commands when older versions of gcovr are found). Fixes #9505
* Fix version requirement on Ninja feature.Jussi Pakkanen2021-10-291-1/+1
|
* Make environment objects hash deterministically.Jussi Pakkanen2021-10-291-3/+8
|
* fix various flake8 whitespace errorsEli Schwartz2021-10-272-8/+8
|
* Add --vsenv command line option and active VS only when neededXavier Claessens2021-10-101-2/+1
|
* Fix typos discovered by codespellChristian Clauss2021-10-101-1/+1
|
* ar linker: generate thin archives for uninstalled static librariesEli Schwartz2021-10-101-1/+1
| | | | | | | | | | | | | | Since they will never be used outside of the build directory, they do not need to literally contain the .o files, and references will be sufficient. This covers a major use of object libraries, which is that the static library would potentially take up a lot of space by including another copy of every .o file. Fixes #9292 Fixes #8057 Fixes #2129
* Merge pull request #9373 from anarazel/vs-build-speedJussi Pakkanen2021-10-101-170/+69
|\ | | | | backend/vs: Parallelize compilation inside one project
| * backend/vs: Parallelize compilation inside one project.Andres Freund2021-10-081-0/+1
| | | | | | | | | | | | | | | | | | | | UseMultiToolTask allows parallelism inside a project, without requiring cl.exe internal multi-threading (which meson generated projects currently can't use, mainly due to specifying output filenames for each object). TODO: - think about making behaviour conditional on msbuild version / add comment why not
| * backend/vs: Deduplicate basic project template.Andres Freund2021-10-081-171/+61
| | | | | | | | | | Note that a few minor details of the output changed for some target types. I think I called them out with XXXs in the code for now.
| * backend/vs: Name pch pdb files to avoid naming & lock conflicts.Andres Freund2021-10-081-0/+7
| |
| * backend/vs: Move Microsoft.Cpp.props to before ItemDefinitionGroup.Andres Freund2021-10-081-2/+3
| | | | | | | | | | | | | | | | | | The main reason for this move is to make it easier to merge the copies of project generation. But as far as I can tell, the Microsoft.Cpp.props import also belongs before the ItemDefinitionGroup. Originally the order seems to have been that way, but 431a9ea664 changed it in the course of other changes.
* | 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
* backend/vs: process link dependencies.Andres Freund2021-10-041-0/+10
| | | | Partially-Fixes: #1799
* fix extra whitespaceEli Schwartz2021-10-043-7/+0
| | | | discovered via flake8 --select E303
* remove useless variables that are no longer or were never usedEli Schwartz2021-10-042-2/+0
|
* rust: dependencies need to cause a rebuild/relink not just reorderDylan Baker2021-10-011-1/+6
| | | | Otherwise changes to a dependency don't propogate
* Make custom_target() name argument optionalXavier Claessens2021-09-301-1/+2
|
* ninjabackend: Rust use Backend.generate_basic_compiler_argsDylan Baker2021-09-241-9/+1
| | | | | Instead of open coding it. This simplifies things, and fixes some missing functionality
* Merge pull request #9167 from dcbaker/submit/meson-main-type-checkingJussi Pakkanen2021-09-241-1/+2
|\ | | | | Add type annotations and type checking to meson main
| * 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.
* | Add option to to transpile Cython to C++Dylan Baker2021-09-241-2/+4
|/ | | | | | | | | | | | | | | | This patch adds a new meson built-in option for cython, allowing it to target C++ instead of C as the intermediate language. This can, of course, be done on a per-target basis using the `override_options` keyword argument, or for the entire project in the project function. There are some things in this patch that are less than ideal. One of them is that we have to add compilers in the build layer, but there isn't a better place to do it because of per target override_options. There's also some design differences between Meson and setuptools, in that Meson only allows options on a per-target rather than a per-file granularity. Fixes #9015
* Merge pull request #9274 from anarazel/fix-vs-static-generatedJussi Pakkanen2021-09-221-0/+3
|\ | | | | backends/vs: Set ObjectFileName for generated sources.
| * backends/vs: Set ObjectFileName for generated sources.Andres Freund2021-09-201-0/+3
| | | | | | | | | | | | | | | | | | When a static library B to a static library A with generated sources, B directly references the object file corresponding to the generated source in A. For that reference in B object_filename_from_source() is used. But A did not specify the object file name, ending up with cl.exe's default. Fixes: #9235
* | ninjabackend/vs: handle builddir on different drive from cwdRyan Kuester2021-09-201-1/+7
|/ | | | | | | | | When setup creates a Visual Studio environment, a message is logged which contains a path to the build directory. Typically, this path is converted to a relative path prior to printing. If the path cannot be converted to a relative path (e.g., because buildpath is on a different drive from the cwd), print out the full path instead of failing with an unhandled exception.
* backend/ninja: add generated sources to depscan order depsDylan Baker2021-09-201-2/+6
| | | | | | | | | Since we changed to using a json file to avoid over long command lines we created a situation where the generated files may not be ready when the depscan happens. To avoid that, we need to add all of the generated sources as order deps. Fixes: #9258
* Fix ignored install_tag kwarg in install_subdir()Xavier Claessens2021-09-161-1/+1
| | | | Fixes: #9263
* apply flake8 fixes for unused imports and missing importsEli Schwartz2021-09-141-1/+1
|
* fix untested codepath? add:item() is surely a typo, not a real functionEli Schwartz2021-09-141-1/+1
|
* backends/vs: Do not emit dummy command for alias_command().Andres Freund2021-09-141-11/+19
| | | | | | | | | Alias commands did not work with the vs backend, due to trying to access target.command[0] with an empty command. Fix this by just not emitting a CustomBuild node for alias targets - the project references are enough to trigger the necessary actions. Fixes: #9247