aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
AgeCommit message (Collapse)AuthorFilesLines
2020-11-12compilers: Standardize the names of compiler optionsDylan Baker3-16/+16
Most options don't use language prefaced options (std vs c_std) internally, as we don't need that due to namespacing. Let's do that across the board
2020-11-12compilers/c: Clang-cl also needs specific handling for standardsDylan Baker1-0/+19
2020-11-12Make MSVC accept gnu11 as a language standard version. Closes: #7611.Jussi Pakkanen1-3/+7
Fixes: #7611
2020-11-09Fix WASM thread count option. Closes #7921.Jussi Pakkanen1-2/+2
2020-11-08Fix "generator doesn't stop" on WindowsChristoph Reiter1-1/+1
When TemporaryDirectory() cleans up on __exit__ it sometimes throws OSError noting that the dir isn't empty. This happens after the first yield in this generator and leads to the exception being handled which leads to a second yield. contextlib.contextmanager() fails then since the function it wraps is only allowed to yield once. Fix this by not yielding again in the error case. Fixes #7947
2020-11-08Add thinlto support. Closes #7493.Jussi Pakkanen5-14/+25
2020-11-07Fix host machine reporting typo in msetup.pyCorey McNeish1-1/+1
2020-11-07Fix clang-tidy return value reporting (#7949)Florian Schmaus1-5/+4
* 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-05rust: implement support for --editionDylan Baker2-0/+22
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-05rewrite: fix modified member spellingMarc-André Lureau1-10/+10
2020-11-05rewrite: fix function spellingMarc-André Lureau1-3/+3
2020-11-04symbolextractor: Add FreeBSD supportThibault Payet1-0/+20
2020-11-04pkgconfig: Make external deps of static library publicXavier Claessens1-3/+6
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-04qt module: fix error message typo, translation qresource accepts qm not tsEli Schwartz1-1/+1
Fixes #7925
2020-11-03wrap: fix type annotationsDylan Baker1-2/+2
2020-11-03wrap: Fix git exception not catched by interpreterXavier Claessens1-1/+11
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-01Fix #5492 (#7919)Elliot2-7/+21
* 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-01gnome: Tweak error messageSam Thursfield1-1/+2
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-01interpreter: store correct files for project regenerationDylan Baker1-6/+18
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-10-30qt: dependency: Strip tool versions from newlinesLaurent Pinchart1-1/+1
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-30Bump minimum supported Python version to 3.6. Closes #6297.Jussi Pakkanen1-13/+2
2020-10-30Bump version number for new development.Jussi Pakkanen1-1/+1
2020-10-30Bump version number for release. This is the 10 000th commit!0.56.0Jussi Pakkanen1-1/+1
2020-10-30environment: Fix detection of swift linkerDylan Baker1-2/+2
Apparently in some cases swift prints to stderr instead of stdout
2020-10-28Fix gtest invoking while workdir is set (#7904)Sergey Kartashev1-3/+3
* 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-26Update version number to rc2.0.56.0.rc2Jussi Pakkanen1-1/+1
2020-10-24cmake: set CMP0054 to new in preload.cmakeDaniel Mensinger2-1/+11
https://cmake.org/cmake/help/latest/policy/CMP0054.html
2020-10-24cmake: Disable the new (CMake 3.16) PCH supportDaniel Mensinger3-1/+30
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-24cmake: Always create missing includes in build dirDaniel Mensinger1-4/+1
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-22depenencies/llvm: Handle llvm-config --shared-mode failing (#7379)Dylan Baker1-1/+7
* 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-22pkgconfig: Define libdir and includedir in -uninstalled.pc filesXavier Claessens1-6/+5
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-19interpreter: Add missing new feature flag for executable(win_subsystem)Dylan Baker1-1/+2
I noticed this when reviewing #7872
2020-10-19switch gui_app deprecation to FeatureDeprecatedKwargsPaolo Bonzini2-1/+1
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-19fix typo "machintosh" -> "macintosh"Ken Cunningham1-1/+1
fixes machine detection for power macintosh systems
2020-10-19Bump version number for rc1.0.56.0.rc1Jussi Pakkanen1-2/+2
2020-10-19In text, betterer grammer usings.Jussi Pakkanen1-1/+1
2020-10-18build: use PIE objects for static libraries if b_staticpic=false but b_pie=truePaolo Bonzini2-8/+12
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-17Fix gnome.compile_resources() when glib is a subprojectXavier Claessens1-33/+38
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-17pkgconfig: InternalDependency's ext_deps should be private by defaultXavier Claessens1-1/+1
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-17Merge pull request #7859 from mensinda/cmBlacklistJussi Pakkanen4-3/+41
cmake: ignore CMAKE_TOOLCHAIN_FILE and CMAKE_PROJECT_INCLUDE
2020-10-16Machine file pkg_config_path overrides environmentXavier Claessens2-6/+8
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-16Refactor handling of machine file optionsXavier Claessens6-221/+140
It is much easier to not try to parse options into complicated structures until we actually collected all options: machine files, command line, project()'s default_options, environment.
2020-10-16cmake: Ignore additional internal CMake variablesDaniel Mensinger1-0/+9
2020-10-16cmake: ignore CMAKE_TOOLCHAIN_FILE and CMAKE_PROJECT_INCLUDE to avoid ↵Daniel Mensinger4-3/+32
conflicts with the meson CMake logic
2020-10-16compilers/cuda: Use format_map(mapping) instead of format(**mapping)Carlos Bederian1-2/+2
2020-10-16compilers/cuda: Fix has_header_symbol checkCarlos Bederian1-4/+17
2020-10-16Fix consistency in variables kwargXavier Claessens2-25/+34
Share common code to extract the `variables` kwarg in declare_dependency() and pkg.generate().
2020-10-15windows: Avoid target name clash happening in GTK+Xavier Claessens1-1/+3
2020-10-15gnome: generate cpp gresource source in cpp projectsmimi899991-2/+8
Closes #7839
2020-10-15intro: Add extra_files key to intro output (fixes #7310)Daniel Mensinger4-40/+59