summaryrefslogtreecommitdiff
path: root/mesonbuild/scripts
Commit message (Collapse)AuthorAgeFilesLines
* Add mypy annotations.cppmodulesJussi Pakkanen2020-12-131-11/+13
|
* Scan all C++ sources and ignore everything else.Jussi Pakkanen2020-12-131-0/+2
|
* C++ module compilation works for a simple project.Jussi Pakkanen2020-12-131-0/+87
|
* Respect MESON_INSTALL_QUIET in gettext.pyDaan De Meyer2020-12-101-1/+2
| | | | Fixes #8068.
* Collect and return clang-format's return codeFlorian Schmaus2020-11-171-3/+4
| | | | | There is no reason why meson should swallow any non-zero exit(/return) code of clang-format.
* Fix clang-tidy return value reporting (Part â…¡)Florian Schmaus2020-11-171-1/+1
| | | | | | | | | It turns out my first attempt to fix this in 00d5ef3191e5 ("Fix clang-tidy return value reporting (#7949)") is not sufficient: The local variable returncode is never updated and stays at 0. This fixes the returncode calculation. Fixes: cce172432be3 ("Use run-clang-tidy when available.")
* Fix clang-tidy return value reporting (#7949)Florian Schmaus2020-11-071-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()
* symbolextractor: Add FreeBSD supportThibault Payet2020-11-041-0/+20
|
* Fix #5492 (#7919)Elliot2020-11-011-5/+19
| | | | | | | | | * fix 5492 with cleaner code * remove argparse import * replace list(map( with list comprehension * pass str rather than Path to get_cmd_line_file
* exclude generated file from clang-tidy processingMichele Dionisio2020-10-121-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
* Never run clang-format / clang-tidy against directoriesBernd Busse2020-10-052-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.
* Make meson_exe report pickled command when it failsJon Turney2020-09-201-1/+5
| | | | | Make 'meson --internal exe --unpickle' report the actual command executed when it fails, which is otherwise invisible.
* externalproject: Fix typing annotationXavier Claessens2020-09-131-3/+3
|
* external-project: Add typing annotationXavier Claessens2020-09-131-4/+5
|
* external-project: New module to build configure/make projectsXavier Claessens2020-09-131-0/+95
| | | | | | | This adds an experimental meson module to build projects with other build systems. Closes: #4316
* typing: fix code reviewDaniel Mensinger2020-09-081-1/+1
|
* typing: get rid of most T.castDaniel Mensinger2020-09-082-7/+11
|
* typing: more fixesDaniel Mensinger2020-09-082-2/+2
|
* typing: fully annotate scriptsDaniel Mensinger2020-09-0822-152/+182
|
* environment: use ExternalProgram to find ninjaPaolo Bonzini2020-09-041-1/+1
| | | | | | | | | | | This allows the NINJA environment variable to support all the Windows special cases, especially allowing an absolute path without extension. Based on a patch by Yonggang Luo. Fixes: #7659 Suggested-by: Nirbheek Chauhan <nirbheek@centricular.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* symbolextractor: Handle PermissionError when running toolNirbheek Chauhan2020-09-021-0/+5
| | | | | | | I can't reproduce this, but it is definitely possible. In this case what we should do is the same as when the tool is not found. Fixes https://github.com/mesonbuild/meson/issues/7605
* meson_exe: Remove two unused functionsChristoph Reiter2020-08-301-9/+0
|
* Dedup final install rpath.Jussi Pakkanen2020-08-301-6/+9
|
* simplify shutil usage by invoking copy2 where appropriateEli Schwartz2020-08-202-4/+2
| | | | It's equivalent to copyfile + copystat with the same arguments.
* Better log message on rpath error.Jussi Pakkanen2020-08-071-1/+2
|
* symbolextractor: use try/finally in solaris_syms when wrapping gnu_symsAlan Coopersmith2020-07-071-3/+5
| | | | | | | As suggested by dcbaker in https://github.com/mesonbuild/meson/pull/7370#pullrequestreview-436872661 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Move mesonbuild/cmake/data/run_ctgt.py to ↵georgev932020-06-301-0/+100
| | | | mesonbuild/scripts/cmake_run_ctgt.py, as well as enclose everything in a run() function so it can be called by `meson --internal cmake_run_ctgt ...`. Also, include mesonbuild/cmake/data/ in the msi package.
* symbolextractor: Add support for SolarisAlan Coopersmith2020-06-221-0/+9
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* coverage: llvm-cov supportCary Converse2020-06-171-12/+34
|
* Also adjust PATH in gtkdochelper for CygwinJon Turney2020-06-131-3/+5
| | | | | Also do Windows loader specific PATH adjustment (to emulate rpath) in gtkdochelper for Cygwin.
* Merge pull request #7103 from dankegel/bug4027-rpath-rememberJussi Pakkanen2020-05-181-8/+24
|\ | | | | Let .pc files and LDFLAGS provide rpaths.
| * Let .pc files specify rpath.Dan Kegel2020-05-161-8/+24
| | | | | | | | Fixes #4027
* | symbolextractor: add OpenBSD supportAntoine Jacoutot2020-05-181-0/+19
| |
* | symbolextractor: Do not store the size of code objectsNirbheek Chauhan2020-05-151-1/+4
|/ | | | | | | | | | This will almost always change and cause a relink of everything. Our other symbol extractor implementations do not store this either. We only need to store the size of data objects, since that necessitates a relink due to copy relocations. Drastically reduces the amount of relinking required in gstreamer and gtk on Linux.
* gtkdochelper.py: Ignore UnicodeEncodeError when printing outputChun-wei Fan2020-04-211-1/+8
| | | | | | | Windows cmd.exe consoles may be using a code page that might choke print() when we are outputting the output from calling gtk-doc. Let's just ignore the error when it happens and print as much as we could in this situation.
* gtkdochelper.py: Support Windows cmd.exe consolesChun-wei Fan2020-04-211-0/+1
| | | | | | On Windows, prepend the commands to call the gtk-doc scripts using the currently-used Python executable, since Windows cmd.exe consoles do not support shebang lines.
* symbolextractor: add support for hurdPino Toscano2020-04-101-1/+1
| | | | Use the GNU toolchain for that.
* symbolextractor: rename linux_syms to gnu_symsPino Toscano2020-04-101-2/+2
| | | | | | | It is not specific to Linux but works with the GNU toolchain, so give it a better name. No functional changes.
* Merge pull request #6637 from ↵Jussi Pakkanen2020-02-231-38/+191
|\ | | | | | | | | mesonbuild/nirbheek/implement-symbolextractor-windows Implement symbolextractor on windows + some cleanups/fixes
| * symbolextractor: Add support for Cygwinnirbheek/implement-symbolextractor-windowsNirbheek Chauhan2020-02-221-0/+26
| |
| * symbolextractor: Add support for clang-clNirbheek Chauhan2020-02-221-27/+37
| | | | | | | | | | | | Requires the latest LLVm 9.0 release which implements the `-list` argument to `llvm-lib` and ships with an implementation of `nm` called `llvm-nm`.
| * symbolextractor: Add a Windows implementationNirbheek Chauhan2020-02-221-7/+80
| | | | | | | | | | Supports both MSVC and MinGW toolchains. Checks for MSVC first, then falls back to MinGW.
| * ninjabackend: Pass the import library to SHSYMNirbheek Chauhan2020-02-221-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | We actually use this while linking on Windows, and hence we need to extract symbols from this file, and not the DLL. However, we cannot pass it instead of the DLL because it's an optional output of the compiler. It will not be written out at all if there are no symbols in the DLL, and we cannot know that at configure time. This means we cannot describe it as an output of any ninja target, or the input of any ninja target. We must pass it as an argument without semantic meaning.
| * symbolextractor: Add typing hintsNirbheek Chauhan2020-02-171-6/+7
| |
| * symbolextractor: Support passing arguments to toolsNirbheek Chauhan2020-02-171-8/+13
| | | | | | | | | | This is how we parse all env vars for tools in Meson. Do the same here too for consistency.
| * symbolextractor: Print a warning if required tools not foundNirbheek Chauhan2020-02-171-26/+49
| | | | | | | | | | Also write out a dummy symbols file if the tool wasn't found or didn't work instead of just spewing an exception.
| * symbolextractor: Correctly filter undefined symbols on macOSNirbheek Chauhan2020-02-161-2/+4
| | | | | | | | | | | | -g is --extern-only and -P is --format=posix. We were missing --defined-only for some reason, which we pass to `nm` on Linux. This avoids having to manually filter later.
| * symbolextractor: Print one warning when no implementation foundNirbheek Chauhan2020-02-161-7/+19
| | | | | | | | | | So people know why all their binaries are getting relinked. Do this only once per build-dir by writing a file to meson-private.
* | depfixer: Ignore more extensions that can't need RPATH fixesNirbheek Chauhan2020-02-171-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generated headers, PDB files, import libraries, etc. Speed-up in gst-build on Windows: ``` meson install before: 5.4 seconds after: 5.1 seconds meson install --only-changed before: 2.7 seconds after: 1.6 seconds ```
* | depfixer: Cache searching of install_name_toolNirbheek Chauhan2020-02-171-1/+11
|/ | | | | | | | | | | | | | | This gives a significant speedup in large projects such as gst-build since now we only search for the tool once. Speed-up on Windows: ``` meson install: before: 15.3 seconds after: 5.4 seconds meson install --only-changed: before: 11.6 seconds after: 2.7 seconds ```