aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-10-09run wrapped-due-to-env commands on unix via the env programEli Schwartz1-1/+18
First, check if the env program exists. If it does, it is faster than doing it via a python script `basically-env.py` that maybe imports all of mesonbuild.* as a side effect of project structure. We do not, however, use env for setting up PATH additions, since env can override an environment variable but not extend it. So in that case we still need to wrap the command via python. By default, all run_targets (at least) are wrapped and now wrap via the `env` program as they export e.g. MESONINTROSPECT='/usr/bin/meson introspect'
2022-10-09compilers: Add optimization=plain optionJan Tojnar19-32/+63
https://github.com/mesonbuild/meson/pull/9287 changed the `optimization=0` to pass `-O0` to the compiler. This change is reasonable by itself but unfortunately, it breaks `buildtype=plain`, which promises that “no extra build flags are used”. `buildtype=plain` is important for distros like NixOS, which manage compiler flags for optimization and hardening themselves. Let’s introduce a new optimization level that does nothing and set it as the default for `buildtype=plain`.
2022-10-07CI: add potential workaround for python crashes in MSYS2Christoph Reiter1-0/+3
There hasn't been any progress on this upstream lately, so try what we use in MSYS2 CI right now
2022-10-06Add handling Qt6's EntryPoint library.Hagen Möbius1-9/+18
- this fixes #10792 - Qt6EntryPoint(d) replaces qtmain(d) from Qt 4 & 5 - uses the same mechanism: `main: true` - uses a special mixin class for pkg-config and config-tool dependency calculation
2022-10-06Only use Debian path fixing on old distros.Jussi Pakkanen1-11/+26
2022-10-04pylint: enable consider-merging-isinstanceDylan Baker4-4/+3
2022-10-04pylint: enable use-a-generatorDylan Baker9-22/+21
This catches some optimization problems, mostly in the use of `all()` and `any()`. Basically writing `any([x == 5 for x in f])` vs `any(x == 5 for x in f)` reduces the performance because the entire concrete list must first be created, then iterated over, while in the second f is iterated and checked element by element.
2022-10-03pylint: enable unnecessary-lambdaDylan Baker2-2/+1
2022-10-03pylint: enable unnecessary-comprehensionDylan Baker6-11/+6
2022-10-03pylint: enable consider-using-(min|max)-builtinDylan Baker2-8/+2
There's only one case of each, in the same function, so I've handled both in the same commit.
2022-10-03pylint: enable unspecified-encodingDylan Baker2-2/+1
2022-10-03pylint: enable unnecessary-dunder-callDylan Baker2-3/+2
2022-10-03AIX: allow link_whole, it's the only supported behaviour anywayAndres Freund1-0/+6
As ld's manpage says: "The ld command processes all input files in the same manner, whether they are archives or not"
2022-10-02Add stable regression testEli Schwartz7-0/+72
This tests stable maintenance branches, to ensure that build directories created with older versions of Meson continue to work without wiping, after updating to a bugfix release.
2022-10-02ci: Fix llvm detection on macOS CINirbheek Chauhan1-12/+27
Downgrade to LLVM-14 from LLVM-15 which is somewhat broken when using static linking at present: https://github.com/Homebrew/discussions/discussions/3666#discussioncomment-3681821 We can't use LLVM's lld instead of ld on macOS because we don't detect it as an Apple linker and pass --as-needed etc to it. Even when that is fixed and we set -lto_library etc correctly, the linker just hangs. LLVM@14 is keg-only, so we need to add CPPFLAGS / LDFLAGS to the keg subdir inside /usr/local The LLVM@15 test is shared-only now and moved to the qt4 macOS job.
2022-09-29doc: Add missing netrc release notesXavier Claessens1-0/+5
2022-09-29doc: Fix wayland release notesXavier Claessens1-2/+2
The core_only kwarg got renamed to include_core_only.
2022-09-29Add cross-compile support for Microsoft GDK platformsCaleb Cornett1-2/+9
2022-09-28Move classes used by scripts to their own moduleXavier Claessens20-150/+247
Those classes are used by wrapper scripts and we should not have to import the rest of mesonlib, build.py, and all their dependencies for that. This renames mesonlib/ directory to utils/ and add a mesonlib.py module that imports everything from utils/ to not have to change `import mesonlib` everywhere. It allows to import utils.core without importing the rest of mesonlib.
2022-09-28gnome: add support for update-mime-databasePaolo Borelli3-0/+17
Fixes https://github.com/mesonbuild/meson/issues/10865
2022-09-28find_library with argument beginning in "lib" is a bad idea, warn about itEli Schwartz1-0/+2
We need to support cases where the library might be called "foo.so" and therefore we check for exact matches too. But this also allows `cc.find_library('libfoo')` to find libfoo.so, which is strange and won't work in many cases. Emit a warning when this happens. Fixes #10838
2022-09-28mlog: Use less from git on WindowsXavier Claessens1-6/+21
2022-09-28wrap: If the directory exists in a sub-subproject, uses it inplaceXavier Claessens5-4/+16
A subproject could have a sub-subproject as a git submodule, or part of the subproject's release tarball, and still have a wrap file for it (e.g. needed for [provide] section). In that case we need to use the source tree for the sub-subproject inplace instead of downloading a new copy into the main project. This is the case with GLib 2.74, it has a subproject "gvdb" as git submodule, and part of release tarball, it ships gvdb.wrap file as well.
2022-09-28wrap: Small simplificationXavier Claessens1-11/+8
2022-09-28wrap: Set self.directory only onceXavier Claessens1-2/+1
It can wait until after parsing the wrap file to set it.
2022-09-28Automatically tag systemtap filesXavier Claessens2-0/+4
2022-09-28Automaticall tag installed testsXavier Claessens2-0/+4
It is common, at least in GNOME projects, to install tests. Files goes into various locations, including: - /usr/lib/x86_64-linux-gnu/installed-tests - /usr/share/installed-tests - /usr/libexec/installed-tests It is safe to assume that everything that goes into a "installed-tests" subdir should be tagged as "tests" by default.
2022-09-27gnome/yelp: fix `xml:lang` attributesJan Tojnar1-1/+1
itstool detects a language code from the mo file’s basename, so when https://github.com/mesonbuild/meson/commit/26c1869a142a952ffa23fe566a255b259304a39b changed the file name to be prefixed with project name, values like “my-project-xx” ended up in the `xml:lang` attribute of the generated page files, instead of the expected IETF BCP 47 language tag. Let’s fix it by passing a locale code to itstool explicitly.
2022-09-27mconf: Do not print None for empty choicesXavier Claessens1-12/+7
2022-09-27mconf: Use pager only when printing configurationXavier Claessens1-6/+7
Fixes: #10845
2022-09-27compilers: Cleanup a bit languages/suffixes listsXavier Claessens5-23/+27
Use set where order does not matter, fix is_source() to really mean only source suffixes.
2022-09-27Fix mypy lintTristan Partin1-1/+1
Unused "type:ignore"
2022-09-26ninjabackend: Fix get_target_generated_sources() return typeXavier Claessens2-10/+12
Type annotation, documentation string, and implementation were doing 3 different things. Change implementation to match type annotation which makes the most sense because it match what get_target_sources() does. All callers only use keys from the returned dictionary any way, but that's going to change in next commits.
2022-09-23mtest: implement a maxfail optionEli Schwartz2-0/+12
This allows early exit of the project tests once a certain number of failures are detected. For example `meson test --maxfail=1` will abort as soon as a single test fails. Currently running tests are marked as failed via INTERRUPT. Resolves #9352
2022-09-23mlog: disable usage of global for log_pagerXavier Claessens1-2/+2
2022-09-23CI: don't set BOOST_ROOT to an empty stringChristoph Reiter1-1/+0
This was initially added in eb76ba7031f053a3c1 to avoid picking it up from azure/gha images. Looks like it is no longer set for some time now though: https://github.com/actions/runner-images/pull/540 so should no longer be needed. The empty string makes some meson tests fail which expect a path. A recent msys2-runtime change now lets empty env vars through to child processes whereas before they would get filtered out, which is why this worked before.
2022-09-23Revert "CI: Add a temporary workaround for broken MSYS2 Python path ↔Christoph Reiter1-3/+0
separator behaviour" This reverts commit 3fd2459a748cc9eed4be73132b002400da81cb0a. The underlying issue has been fixed and deployed: https://github.com/msys2-contrib/cpython-mingw/pull/107
2022-09-22pylint: enable global-statementDylan Baker8-19/+13
This does force a number of uses of `# pylint: disable` comments, but it also finds a couple of useless global uses and one place (in the previous commit) that an easy refactor removes the use of global. Global is a code smell, so forcing adding a comment to disable helps force developers to really consider if what they're doing is a good idea.
2022-09-22pylint: enable global-variable-not-assignedDylan Baker4-4/+0
The `global` statement is only needed to assign to global variables, not read or mutate them. So calling `global.mutate()` is fine, but not `var = foo`, which would otherwise shadow `var`.
2022-09-22modules/gnome: make_native_glib_version an instance varDylan Baker2-14/+8
This removes the need for the use of the global statement. I've also updated the test that overrides this to use mock.patch instead of hand monkey patching.
2022-09-22compilers: unify fortran sanity check with its parent Clike handlingEli Schwartz2-40/+14
We *mostly* just need to do the same thing. Plug in one utility method to make sanity_check_impl find the right compile args, and plug in DEVNULL to the test run. It's that simple. This solves a few inconsistencies. The main one is that fortran never logged the sanity checks to the Meson debug log, making it hard to debug. There's also some interesting quirks we built up in the dedicated fortran handling. For example: - in commit 5b109c9ad27aea39ce49d1da8ef0c957ccaef3b9 we added cwd to building the fortran executable, with a wordy comment about how the compiler has defects. But the clike base has always done that on general principle anyway, so we would never have had that bug in the first place. - in commit d6be7822a0a7391c9d2a22c053cd4fc61b5a71e4 we added special deletion of an old "bad existing exe file" just for fortran. Looking at the PR discussion for this odd requirement, it turns out that the real problem is mixing WSL and native Windows without deleting the build directory. This is apparently fortran specific simply because "contemporary Windows 10 Fortran users" switch between the two? The actual problem is that this never used .exe as the output name, so Windows thinks you want to run something other than the thing you asked to run, because it's not even a Window executable. But... the common clike handling could have fixed that without needing special cases.
2022-09-22use simpler subprocess.run interface instead of manual PopenEli Schwartz1-2/+1
This code dates back to 2012 and probably has no specific reason...
2022-09-22compilers: make sanity checks log commands using join_argsEli Schwartz1-3/+3
It is more correct to join commands with a command joiner than a whitespace joiner.
2022-09-22clean up message for OSError errorhandlerEli Schwartz1-6/+2
Currently it repeats the text of the exception, which appeared immediately above. And strerror is already part of args, so that was then doubled. `str(e)` formats this much better anyway. While we are at it, point out that it is probably a build environment issue, rather than just saying "this is probably not a meson bug". The former comes across a bit more as constructive advice rather than just "idk but it's not our fault".
2022-09-22fix regression in logging runpython errorsEli Schwartz1-8/+9
In commit fa044e011d5d7a3525c9b3f2acfe1cbf4a0a96a1 we caught OSError and started emitting a special error message disclaiming that it probably isn't Meson's fault, and skipping the generic "This is a meson bug and should be reported" handler. But, we no longer did this after verifying that the command *isn't* runpython, so arbitrary scripts that raised OSError would start saying stuff about Meson, which was wrong. Start checking for runpython first.
2022-09-22refactor errorhandler for deduplication of logicEli Schwartz1-23/+21
Mostly just move a comment around back to where it's more relevant, and handle MESON_FORCE_TRACEBACK once instead of twice.
2022-09-22fix regression in handling errors during reconfigureEli Schwartz1-38/+45
In commit 9ed5cfda155c585f7aea896fe2f40d3a92eac43a we refactored startup to be a bit faster and import less. But this had the side effect of moving out of our errorhandler. Refactor this so it can be easily used elsewhere.
2022-09-22CI: Add a temporary workaround for broken MSYS2 Python path separator behaviourChristoph Reiter1-0/+3
"MSYSTEM= python ..." no longer works because of some changes in the MSYS2 runtime Until this is fixed in either MinGW Python or the MSYS2 runtime this should revert things to the previous behaviour to get the CI green again.
2022-09-22Add release notes snippet for new mconf behaviourXavier Claessens1-0/+6
2022-09-22mconf: Add --no-pager optionXavier Claessens1-1/+4