Commit Graph

10025 Commits

Author SHA1 Message Date
Jussi Pakkanen 3e6fbde94c Add thinlto support. Closes #7493. 2020-11-08 16:00:05 +02:00
Corey McNeish b6dc4d5e5c Fix host machine reporting typo in msetup.py 2020-11-07 12:03:24 +02:00
Florian Schmaus 00d5ef3191
Fix clang-tidy return value reporting (#7949)
* Fix clang-tidy return value reporting

In case clang-tidy is invoked manually, i.e. if run-clang-tidy(.py) is
not found, Meson would not report the return value. This is caused by
ignoring the return value of manual_clangformat() in clangformat()
within mesonbuild/scripts/clangtidy.py.

Even though only more recent-versions of clang-tidy actually report an
non-zero exit code if errors are found, there is no reason Meson
shouldn't simply report any error codes it received from clang-tidy.

Fixes #7948.

* Rename methods in clangtidy.py from clangformat to clangtidy

For some unknown reason, the method names in clangtidy.py are clangformat()
and manual_clangformat(). This is confusing, as clang-format is not
invoked by them, clang-tidy is. Hence rename those from

{manual_}clangformat() → {manual_}clangtidy()
2020-11-07 00:20:54 +02:00
Michael Weiss cc033e5476
docs: Recommend to use SPDX license identifiers [skip ci]
Some license identifiers are ambiguous (e.g. "GPL3"). The SPDX license
identifiers avoid this by providing standardized and unique identifiers
(e.g. "GPL-3.0-only" or "GPL-3.0-or-later" for the previous example).

Because SPDX short-form identifiers are also both human- and
machine-readable we should recommend them in the documentation.

More information (advantages, details, etc.) can be found here:
- https://spdx.dev/resources/use/#identifiers
- https://spdx.dev/ids/

Fix #7905.
2020-11-05 21:28:12 +02:00
Dylan Baker 7860a6aeab rust: implement support for --edition
Using the std option, so now `rust_std=..` will work. I've chosen to use
"std" even though rust calls these "editions", as meson refers to
language versions as "standards", which makes meson feel more uniform,
and be less surprising.

Fixes: #5100
2020-11-05 21:24:20 +02:00
Marc-André Lureau be2c1a4300 rewrite: fix modified member spelling 2020-11-05 21:22:14 +02:00
Marc-André Lureau 7ba7ea0897 rewrite: fix function spelling 2020-11-05 21:22:14 +02:00
Johan Bjäreholt d58dcf26e7
docs: Fix broken anchor links [skip ci]
Apparently anchor links are case-sensitive and needs to be lowercase in hotdoc.
Prior to this change the anchor links were uppercase so the link did not refer to the anchor tag.

Likely that there are more occurrences around the docs than this, have not looked.
2020-11-05 21:10:57 +02:00
Thibault Payet eec5bb11ba symbolextractor: Add FreeBSD support 2020-11-04 18:16:03 +02:00
Christoph Reiter a7edbc6ee5 CI: install pytest pytest-xdist for msys2 2020-11-04 18:13:58 +02:00
Christoph Reiter f000fa407d CI: Port MSYS2 from azure-pipelines to github actions
This uses the msys2/setup-msys2@v2 to set up MSYS2
2020-11-04 18:13:58 +02:00
Xavier Claessens 6d816c1800 pkgconfig: Make external deps of static library public
This fix a regression caused by
https://github.com/mesonbuild/meson/pull/7837, it wanted to make
InternalDependency's external_deps private but has side effect of making
StatisLibrary's external_deps private too.

It is technically correct to make them private, but Meson used to make
StaticLibrary deps public so they are usable without `pkg-config
--static` when we know there is only a static library available.

Fixes: #7929.
2020-11-04 17:56:48 +02:00
Eli Schwartz 478feb39ed qt module: fix error message typo, translation qresource accepts qm not ts
Fixes #7925
2020-11-04 17:23:34 +02:00
Luke Drummond 63814543de Bare exceptions are no longer allowed [NFC]
The last instances of

    try:
        ...
    except:
        ...

were removed in bf98ffca. The sideci.yml file was updated, but the
flake8 config still allows this. Ensure that flake8 tests fail if this
questionable construct appears again.
2020-11-04 12:24:48 +02:00
Dylan Baker 2bd309543f wrap: fix type annotations 2020-11-03 21:42:18 -05:00
Xavier Claessens 42cc9294e9 wrap: Fix git exception not catched by interpreter
This is a regression introduced in Meson 0.56.0, it was fatal
error when optional dependencies fails to download their fallback
subproject.
2020-11-03 21:28:32 +02:00
Aman Verma 388fa6e776 vim: Drop backwards compatibility with Vim 5. 2020-11-03 21:06:22 +02:00
Jussi Pakkanen 9d1e747d17 Condense test directory names again. 2020-11-03 21:05:20 +02:00
Elliot ff50f724bb
Fix #5492 (#7919)
* fix 5492 with cleaner code

* remove argparse import

* replace list(map( with list comprehension

* pass str rather than Path to get_cmd_line_file
2020-11-01 10:50:15 -08:00
Sam Thursfield 505b5b2391 gnome: Tweak error message
It's an easy mistake to do this:

    gir1 = gnome.generate_gir(...)
    gir2 = gnome.generate_gir(...
        includes: ['GObject-2.0', gir1])

This fails with an error:

    ERROR: Gir includes must be str, GirTarget, or list of them.

The issue is that the 'gir1[0]' should be passed instead of 'gir1'.
To make the problem slightly clearly, tweak the error message to be:

    ERROR: Gir includes must be str, GirTarget, or list of them. Got TypelibTarget.
2020-11-01 19:27:09 +02:00
Dylan Baker 47d071a34f interpreter: store correct files for project regeneration
Right now sub-sub projects are not correctly registered, because we
don't have a way to pass up past the first level of subproject. This
patch changes that by making the build_Def_files as defined in the
Interpreter initializer accurate for translated dependencies, ie, cmake
dependencies won't define a dependency on a non-existent meson.build.
This means that it can always add the subi.build_def_files because they
are always accurate.
2020-11-01 19:26:31 +02:00
Laurent Pinchart d4eec9664b qt: dependency: Strip tool versions from newlines
When finding the Qt compilation tools (moc, uic, rcc, lrelease), the
version strings contain a trailing newline character. This results in a
stray newline in the meson log:

Detecting Qt5 tools
Program /usr/lib64/qt5/bin/moc found: YES 5.14.2
 (/usr/lib64/qt5/bin/moc)
Program /usr/lib64/qt5/bin/uic found: YES 5.14.2
 (/usr/lib64/qt5/bin/uic)
Program /usr/lib64/qt5/bin/rcc found: YES 5.14.2
 (/usr/lib64/qt5/bin/rcc)
Program /usr/lib64/qt5/bin/lrelease found: YES 5.14.2
 (/usr/lib64/qt5/bin/lrelease)

Strip the version to avoid this, resulting in a cleaner log:

Detecting Qt5 tools
Program /usr/lib64/qt5/bin/moc found: YES 5.14.2 (/usr/lib64/qt5/bin/moc)
Program /usr/lib64/qt5/bin/uic found: YES 5.14.2 (/usr/lib64/qt5/bin/uic)
Program /usr/lib64/qt5/bin/rcc found: YES 5.14.2 (/usr/lib64/qt5/bin/rcc)
Program /usr/lib64/qt5/bin/lrelease found: YES 5.14.2 (/usr/lib64/qt5/bin/lrelease)

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-10-30 11:42:00 +02:00
Dylan Baker fe24292ae3 setup.cfg: Add pytest discovery args
We have a single giant file for our tests, but a number of files that
match pytest's default discovery globs. To fix that, let's tell pytest
what to do.

This means you can just `pytest` and get the right results. It also
helps IDE's like vscode correctly identify tests.
2020-10-30 11:41:29 +02:00
Jussi Pakkanen bca90722ec Bump minimum supported Python version to 3.6. Closes #6297. 2020-10-30 11:18:11 +02:00
Jussi Pakkanen 8fbf10c4bc Bump version number for new development. 2020-10-30 11:17:02 +02:00
Jussi Pakkanen f16d31607e Bump version number for release. This is the 10 000th commit! 2020-10-30 10:25:24 +02:00
Dylan Baker 712cbe0568 environment: Fix detection of swift linker
Apparently in some cases swift prints to stderr instead of stdout
2020-10-30 02:04:26 +02:00
Sergey Kartashev c9b7e5bd40
Fix gtest invoking while workdir is set (#7904)
* Fix gtest invoking while workdir is set

* Fix gtest invoking when workdir is not set

* Code style fix

Co-authored-by: Sergey Kartashev <kartashev.sv@mipt.ru>
2020-10-28 17:04:11 -07:00
Jussi Pakkanen 42d6b37423 Update version number to rc2. 2020-10-26 20:17:56 +02:00
Daniel Mensinger 431f0b0da2 cmake: set CMP0054 to new in preload.cmake
https://cmake.org/cmake/help/latest/policy/CMP0054.html
2020-10-24 19:31:15 +02:00
Daniel Mensinger fc57089bc5 cmake: Disable the new (CMake 3.16) PCH support
Subprojects that use the CMake PCH feature will cause
compilation/linker errors. The CMake PCH support
should thus be disabled until this can be properly
translated to meson.
2020-10-24 19:31:15 +02:00
Daniel Mensinger 1eb9d8ad6e cmake: Always create missing includes in build dir
There really isn't any reason to not always create missing
include directories inside the build dir. Just restricting
this to generate generated sources should work in an ideal
world, however, there exists lots of suboptimal CMake code
where this assumption is not always true.
2020-10-24 19:31:15 +02:00
Dylan Baker e8399c8c6e
depenencies/llvm: Handle llvm-config --shared-mode failing (#7379)
* depenencies/llvm: Handle llvm-config --shared-mode failing

Fixes: #7371
Fixes: #7878

* test cases/llvm: Refactor to use test.json

Instead of trying to cover everything internally
2020-10-22 17:21:14 +03:00
Danilo Spinella e7009d439c Syntax.md: Fix variable used in substring example 2020-10-22 08:47:24 -04:00
Xavier Claessens 14fd1a329a pkgconfig: Define libdir and includedir in -uninstalled.pc files
This fixes glib-2.0-uninstalled.pc file.
GLib does `extra_cflags : ['-I${libdir}/glib-2.0/include']` because some
of its headers gets installed there. But when used uninstalled that path
makes no sense and pkg-config aborts because ${libdir} is not defined.
This cannot be worked around by GLib because Meson does not allow
setting different `extra_cflags` for -uninstalled.pc, and does not allow
setting libdir in `uninstalled_variables`.
2020-10-22 00:58:30 +03:00
Dylan Baker bf5bcad05f interpreter: Add missing new feature flag for executable(win_subsystem)
I noticed this when reviewing #7872
2020-10-19 13:48:56 -04:00
Paolo Bonzini e36b1923e2 fix markdown issue 2020-10-19 09:40:31 -07:00
Paolo Bonzini df29f760dd switch gui_app deprecation to FeatureDeprecatedKwargs
The deprecation message for "gui_app" is appearing for every target
rather than just once, and even if the required version is older
than 0.56.0.  Use @FeatureDeprecatedKwargs to fix both issues.
2020-10-19 09:40:31 -07:00
Ken Cunningham faabbb3bb2 fix typo "machintosh" -> "macintosh"
fixes machine detection for
power macintosh systems
2020-10-19 09:39:03 -07:00
Jussi Pakkanen 55d370e565 Bump version number for rc1. 2020-10-19 00:34:49 +03:00
Jussi Pakkanen 0f4f0acaff Remove a status message that leaks to stdout. 2020-10-19 00:04:38 +03:00
Jussi Pakkanen 64f8479097 In text, betterer grammer usings. 2020-10-19 00:04:14 +03:00
Jussi Pakkanen ac6041e110 Add delays to test for timestamp issues on mac. 2020-10-19 00:03:37 +03:00
Paolo Bonzini 021d242f9c build: use PIE objects for static libraries if b_staticpic=false but b_pie=true
If static_library is used as a convenience library (e.g. for link_whole)
it should in principle not need position independent code.
However, if the executables that the libraries is linked to are PIE,
the non-PIC objects in the static library will cause linker errors.
To avoid this, obey b_pie for static libraries if either b_staticpic=false
or they use "pic: false".

Without this patch, QEMU cannot use b_staticpic, which causes a slowdown
on some QEMU benchmarks up to 20%.
2020-10-18 18:56:35 +03:00
Xavier Claessens a050db5e30 Fix gnome.compile_resources() when glib is a subproject
When glib is a subproject we should use glib-compile-resources it
overrides using find_program() in the case it is not installed on the
build machine. With old glib version we have to run
glib-compile-resources at configure time to generate the list of
dependencies, but not when glib is recent enough.
2020-10-17 22:25:57 +03:00
Xavier Claessens 0c95d92404 pkgconfig: InternalDependency's ext_deps should be private by default
This fixes a regression introduced by
https://github.com/mesonbuild/meson/pull/7488.

InternalDependency's ext_deps previously where simply ignored, but that
PR has effect to add many more public Requires in generated pc files.
2020-10-17 15:53:46 +03:00
Jussi Pakkanen 66d3747efe
Merge pull request #7859 from mensinda/cmBlacklist
cmake: ignore CMAKE_TOOLCHAIN_FILE and CMAKE_PROJECT_INCLUDE
2020-10-17 12:35:35 +03:00
Xavier Claessens ed70c6df52 Subprojects should not inherit parent override
This was the behaviour in 0.55.0, so this test was assuming a behaviour
change. Revert it to the behaviour we had in 0.55.0.
2020-10-16 17:42:24 -04:00
Xavier Claessens 7271b1e942 Machine file pkg_config_path overrides environment
This is consistent with c_args in machine file overriding CFLAGS from
env. This also spotted an issue where in a native build this resulted
in pkg_config_path being /bar instead of /foo:
`-Dpkg_config_path=/foo -Dbuild.pkg_config_path=/bar`

Fixes: #7573
2020-10-16 17:42:24 -04:00
Xavier Claessens 254b836bd4 Add test case for "subproject:opt" in project()
This is regression test for #7573
2020-10-16 17:42:24 -04:00