aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
AgeCommit message (Collapse)AuthorFilesLines
2020-10-13Merge wraps from subprojects into wraps from main projectXavier Claessens3-71/+72
wraps from subprojects are now merged into the list of wraps from main project, so they can be used to download dependencies of dependencies instead of having to promote wraps manually. If multiple projects provides the same wrap file, the first one to be configured wins. This also fix usage of sub-subproject that don't have wrap files. We can now configure B when its source tree is at `subprojects/A/subprojects/B/`. This has the implication that we cannot assume that subproject "foo" is at `self.subproject_dir / 'foo'` any more.
2020-10-13interpreter: Rename dirname to subp_nameXavier Claessens1-65/+65
dirname is confusing because the name of a subproject does not always match its directory name, the wrap file can define another directory. For example foo.wrap will often extract the subproject into foo-1.2 directory, in that case the subproject name is 'foo' and the subproject directory is 'foo-1.2'.
2020-10-13include_type: Add CMake subporject dependency method (fixes #6879)Daniel Mensinger1-3/+10
2020-10-13include_type: honor include_type in dependency fallbacks (fixes #7503)Daniel Mensinger1-0/+8
2020-10-13Merge pull request #7816 from mensinda/cmCrossJussi Pakkanen9-268/+407
cmake: Cross compilation support
2020-10-13mtest: Allow filtering tests by subprojectNirbheek Chauhan2-7/+35
You could always specify a list of tests to run by passing the names as arguments to `meson test`. If there were multiple tests with that name (in the same project or different subprojects), all of them would be run. Now you can: 1. Run all tests with the specified name from a specific subproject: `meson test subprojname:testname` 1. Run all tests defined in a specific subproject: `meson test subprojectname:` Also forbid ':' in test names. We already forbid this elsewhere, so should not be a big deal.
2020-10-13cmake: Add cross compilation supportDaniel Mensinger9-268/+407
2020-10-13msubprojects: Handle wrap-file to wrap-git caseXavier Claessens1-18/+34
2020-10-13msubprojects: Handle change of URL in wrap-gitXavier Claessens1-3/+25
2020-10-13cuda: Also read CUDART_VERSION from cuda_runtime_api.hDaniel Mensinger1-2/+25
2020-10-12exclude generated file from clang-tidy processingMichele Dionisio1-1/+3
by default run_clang_tidy process al file in compile_commands.json but the file generated has to be esclude like already done from manual_clangformat
2020-10-12Merge pull request #7740 from bonzini/fallback-falseJussi Pakkanen2-34/+45
Allow blocking/forcing automatic subproject search
2020-10-12mtest: collect failures regardless of colorized consoleCamilo Celis Guzman1-9/+11
2020-10-10Properly handle the case of linking static library with custom targetsSahnvour1-4/+31
2020-10-08dependency: support boolean argument "allow_fallback"Paolo Bonzini2-5/+16
Sometimes, distros want to configure a project so that it does not use any bundled library. In this case, meson.build might want to do something like this, where slirp is a combo option with values auto/system/internal: slirp = dependency('', required: false) if get_option('slirp') != 'internal' slirp = dependency('slirp', required: get_option('slirp') == 'system') endif if not slirp.found() slirp = subproject('libslirp', ...) .variable('...') endif and we cannot use "fallback" because the "system" value should never look for a subproject. This worked until 0.54.x, but in 0.55.x this breaks because of the automatic subproject search. Note that the desired effect here is backwards compared to the policy of doing an automatic search on "required: true"; we only want to do the search if "required" is false! It would be possible to look for the dependency with `required: false` and issue the error manually, but it's ugly and it may produce an error message that looks "different" from Meson's. Instead, with this change it is possible to achieve this effect in an even simpler way: slirp = dependency('slirp', required: get_option('slirp') != 'auto', allow_fallback: get_option('slirp') == 'system' ? false : ['slirp', 'libslirp_dep']) The patch also adds support for "allow_fallback: true", which is simple and enables automatic fallback to a wrap even for non-required dependencies.
2020-10-08interpreter: clean up handling of force_fallbackPaolo Bonzini2-14/+13
Force_fallback is not an interpreter keyword argument, and there is no reason to handle it as one since it is not used anywhere else (and in fact is explicitly ignored by get_dep_identifier). Use a Python keyword argument instead, which makes the code simpler.
2020-10-08interpreter: refactor handling of dependency(fallback: ...)Paolo Bonzini1-21/+22
2020-10-07Add win_subsystem kwarg. Closes #7765.Jussi Pakkanen6-6/+55
2020-10-06python.dependency() is not respecting 'required' kwargXavier Claessens1-2/+9
2020-10-06environment: provide a more detailed explanation of linker detection failuresDylan Baker1-2/+8
Just saying "it failed" is accurate, but not useful to helping someone figure out why it failed. Giving them the stdout and stderr (like we might with compilers) should help people resolve the issue. Fixes: #7173
2020-10-06compilers: Enable C++20 for Intel C++ Compiler.Vinson Lee1-0/+3
Intel C++ Compiler 19.1 has C++20 features. https://software.intel.com/content/www/us/en/develop/articles/intel-c-compiler-191-for-linux-release-notes-for-intel-parallel-studio-xe-2020.html Signed-off-by: Vinson Lee <vlee@freedesktop.org>
2020-10-05options: Handle updates to choices in optionsDylan Baker1-5/+15
Currently if you change the `choices` field in the meson_options.txt file, no update will be done until `meson setup --wipe` is called. Now if the choices change then the options will be properly merged. If the currently select value is still valid it is guaranteed to be kept, if it is now invalid the new default value will be used and a warning will be printed. Fixes #7386
2020-10-05Never run clang-format / clang-tidy against directoriesBernd Busse2-0/+4
`pathlib.Path.glob()` also returns directories that match source filenames (i.e. a directory named `test.h/`), but `clang-format` and `clang-tidy` fail when handed a directory. We manually skip calling `clang-format` and `clang-tidy` on those directories.
2020-10-05machinefiles: Allow keys to be stored case insensitiveDylan Baker1-2/+6
This is required to make the various keys in the [user options] section work the same as they do in the meson_options.txt file, where we don't have any rules about case sensitivity. There is some risk here. Someone may be relying on this lower by default behavior, and this could break their machine files. Fixes #7731
2020-10-04linkers: Drop -pie on macOSRoman Bolshakov1-1/+1
Projects that specify b_pie=true clutter build logs with the warning: clang: warning: argument unused during compilation: '-pie' [-Wunused-command-line-argument] No option is needed to produce PIE binaries because ld64 is making PIE executables on 10.7 and above by default, as documented in ld(1). Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
2020-10-04Fixed using files object in subdir with xcode backendOskar Sigvardsson1-1/+1
Fixes bug #589. When generating string from file object, it didn't take subdir into account.
2020-10-04pathlib: Fix resolve() by overriding it in Python 3.5Daniel Mensinger34-35/+85
2020-10-04cmake: switch to pathlib (fixes #7322)Daniel Mensinger9-252/+260
2020-10-03Merge pull request #7795 from dcbaker/submit/full-compiler-annotationsDylan Baker29-903/+1154
Full annotations for the Compiler package
2020-10-02Fix meson compile for 32-bit MSVC buildVili Väinölä1-12/+16
- Remove platform from env so that msbuild does not try to compile e.g. configuration debug|x86
2020-10-01compilers/icl fix IntelClCPP argument checkingDylan Baker1-0/+4
Unlike MSVC and ClangCl it needs to call into it's own compiler check args
2020-10-01compilers/icl: Fix pch usageDylan Baker1-0/+3
2020-10-01linkers: Fix Xilink constructorDylan Baker1-2/+5
2020-10-01compilers/fortran: make ifort on windows signature match ICL'sDylan Baker2-3/+3
2020-10-01compilers/clike: Store exe_wrapper as ExternalProgramDylan Baker2-4/+4
Which is what other languages do.
2020-10-01compilers: make get_optimization_args abstractDylan Baker2-1/+5
2020-10-01compilers/fortran: fix has_multi_*_argumentsDylan Baker2-23/+12
The implementation of the link variant was what should have been the compiler variant, and there was no valid compiler variant, which meant it was getting C code.
2020-10-01compilers/d: add type annotationsDylan Baker2-128/+143
2020-10-01compilers/gnu: Don't pretend to inherit CLikeDylan Baker1-1/+1
We don't need it anymore, and it would be problematic for the D compilers.
2020-10-01compilers: move _build_wrapper out of clike into CompilerDylan Baker2-51/+79
This abstraction is really useful, and most compilers could use it (including D). It also will allow the Gnu mixins to work properly without the CLikeCompiler in their mro.
2020-10-01compilers: clang: use get_compiler_check_argsDylan Baker1-5/+8
2020-10-01compilers/intel: use get_compiler_check_argsDylan Baker2-24/+15
Instead of trying to override the compiles() method, which gets skipped in a bunch of cases.
2020-10-01compilers: move get_compile_check_args() to CompilerDylan Baker3-26/+47
This is groundwork to put _build_wrapper in the base Compiler, which is needed to make the D compilers truly type safe.
2020-10-01compilers/fortran: add type annotationsDylan Baker2-92/+143
2020-10-01compilers/java: Add type annotationsDylan Baker1-24/+22
2020-10-01compilers/rust: add type annotationsDylan Baker1-25/+38
2020-10-01compilers/swift: Add type annotationsDylan Baker2-32/+39
2020-10-01Compilers/vala: Add type annotationsDylan Baker2-24/+35
2020-10-01compilers/cuda: make type safeDylan Baker6-71/+75
2020-10-01mesonlib: make OptionOverrideProxy a true MutableMappingDylan Baker3-23/+31
So that we can actually use it anyplace that an OptionDictType could be used. I've also done a bit optimizing/simplifying of the implementation. This is needed for cuda, as it returns an OptionOverrideProxy where we ask for an OptionDicType