aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/scripts
AgeCommit message (Collapse)AuthorFilesLines
2020-05-15symbolextractor: Do not store the size of code objectsNirbheek Chauhan1-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.
2020-04-21gtkdochelper.py: Ignore UnicodeEncodeError when printing outputChun-wei Fan1-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.
2020-04-21gtkdochelper.py: Support Windows cmd.exe consolesChun-wei Fan1-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.
2020-04-10symbolextractor: add support for hurdPino Toscano1-1/+1
Use the GNU toolchain for that.
2020-04-10symbolextractor: rename linux_syms to gnu_symsPino Toscano1-2/+2
It is not specific to Linux but works with the GNU toolchain, so give it a better name. No functional changes.
2020-02-23Merge pull request #6637 from ↔Jussi Pakkanen1-38/+191
mesonbuild/nirbheek/implement-symbolextractor-windows Implement symbolextractor on windows + some cleanups/fixes
2020-02-22symbolextractor: Add support for CygwinNirbheek Chauhan1-0/+26
2020-02-22symbolextractor: Add support for clang-clNirbheek Chauhan1-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`.
2020-02-22symbolextractor: Add a Windows implementationNirbheek Chauhan1-7/+80
Supports both MSVC and MinGW toolchains. Checks for MSVC first, then falls back to MinGW.
2020-02-22ninjabackend: Pass the import library to SHSYMNirbheek Chauhan1-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.
2020-02-17depfixer: Ignore more extensions that can't need RPATH fixesNirbheek Chauhan1-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 ```
2020-02-17depfixer: Cache searching of install_name_toolNirbheek Chauhan1-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 ```
2020-02-17symbolextractor: Add typing hintsNirbheek Chauhan1-6/+7
2020-02-17symbolextractor: Support passing arguments to toolsNirbheek Chauhan1-8/+13
This is how we parse all env vars for tools in Meson. Do the same here too for consistency.
2020-02-17symbolextractor: Print a warning if required tools not foundNirbheek Chauhan1-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.
2020-02-16symbolextractor: Correctly filter undefined symbols on macOSNirbheek Chauhan1-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.
2020-02-16symbolextractor: Print one warning when no implementation foundNirbheek Chauhan1-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.
2019-11-17commandrunner: Forward KeyboardInterrupt to commandAlberto García Hierro1-1/+6
Some commands, notably gdb, use ctrl+c themselves to perform actions without exiting. Instead of making meson exit and thus, kill the subprocess, ignore the KeyboardInterrupt and continue waiting for the child.
2019-11-12Prevent install_name_tool to run on EXE when cross compile on OSXBinh Nguyen1-2/+2
2019-10-22Add source tags targetsMarc-André Lureau1-0/+51
2019-10-21Use run-clang-tidy when available.Jussi Pakkanen1-4/+18
2019-10-20Fix all flake8 warningsDaniel Mensinger1-1/+0
2019-10-01Add clang-tidy target. Closes #2383.Jussi Pakkanen1-0/+38
2019-09-29Find clang-format with alternative namesTing-Wei Lan1-3/+10
This is similar to what we currently do for scan-build except there is no environment variable to choose a specific clang-format to run. If an environment variable is needed for better control, we can add it later.
2019-09-14uniform scan-build detection processGabriel Ganne1-34/+6
Detect scan-build the same way when trying to launch it and when generating the target. The detection method is: 1. look within SCANBUILD env variable 2. shutil.which('scan-build') 3. *on non-linux platforms only*: go through all the possible name candidates and test them individually. The third step is added following this comment https://github.com/mesonbuild/meson/pull/5857#issuecomment-528305788 However, going through a list of all the possible candidates is neither easily maintainable nor performant, and is therefore skipped on platforms that should not require such a step (currently, only Linux platforms). This is a follow-up to the issue raised by @lantw44 during PR: https://github.com/mesonbuild/meson/pull/5857
2019-09-05mesonlib.split_args/quote_arg/join_argsAleksey Gurtovoy2-6/+4
2019-08-24wine: Try to get the short paths when generating WINEPATHThibault Saunier1-8/+4
The size of WINEPATH is limited (1024 [until recently]), we can very easily reach that limit, and even the new one (2048) so try to keep path as small as possible by using the shortPath version of paths. Also assert that we do not reach the new hard limit. And avoid having duplicates in the list of path. [until recently]: https://bugs.winehq.org/show_bug.cgi?id=45810
2019-08-04gtkdoc: Use find_program() to get gtkdoc toolsXavier Claessens1-14/+19
This will allow using gtk-doc as a subproject instead of having to install it on the system. It also has the side effect of failing at configuration time with a proper message if gtkdoc is not installed, instead of failing at build time with a python backtrace.
2019-08-03Merge pull request #5644 from bonzini/meson-exe-cmdlineJussi Pakkanen1-30/+27
Show command line in `ninja -v` for `capture: true` custom targets and generators
2019-08-02remove unreachable codeMichael Hirsch, Ph.D1-3/+2
2019-07-23Made dist a top level command.Jussi Pakkanen1-210/+0
2019-07-19backends: do not split command and arguments in ExecutableSerialisationPaolo Bonzini1-8/+5
This is not needed anymore, just make a single field with the whole command line.
2019-07-19backends: remove unnecessary fields from ExecutableSerialisationPaolo Bonzini1-10/+5
"exe.is_cross and exe.needs_exe_wrapper" is the same condition under which meson chooses whether to include the exe_wrapper. meson_exe has an assertion for that, but now that meson_exe does not need anymore exe.is_cross, we can simplify the code if we just "trust" meson to do the right thing. Remove both fields from ExecutableSerialisation and just test the presence of the wrapper, and also remove the executable basename which is only used to "beautify" an assertion failure.
2019-07-19backends: discover java/mono wrapper at generation timePaolo Bonzini1-20/+10
Move the magic to execute jar and .exe files from "meson --internal exe" to the backend, so that "ninja -v" shows more clearly what is happening. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-07-19backends: create ExecutableSerialisation in meson_exe if possiblePaolo Bonzini1-9/+24
If meson_exe is only being used to capture the output of the command, we can skip going through a pickled ExecutableSerialization object. This makes "ninja -v" output more useful.
2019-07-18fix all flake8 issuesDaniel Mensinger1-1/+0
2019-07-15meson: skip captured write if content didn't changeMarc-André Lureau1-2/+9
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2019-07-10Reference error code as hex value and improve commentNorbert Nemec1-2/+2
2019-07-10diagnostics for missing DLLs on Windows in meson_exe.pyNorbert Nemec1-0/+5
2019-07-01Use the same directory names for dist so that ccache works. Closes #5583.Jussi Pakkanen1-5/+9
2019-06-27meson_exe: Don't assert that we need an exe_wrapper when we say we don't ↔Dylan Baker1-3/+3
need one Fixes cross compiling mesa from x86_64 -> x86 on an x86_64 system. Fixes #5567
2019-06-06gnome.yelp(): Fix media symlink fallback pathChristoph Reiter1-2/+4
When the media file for a specific language doesn't exist we try to symlink it to the C one. If symlinking fails we need to fall back to copying the C one like in the non-symlink case. The fallback code path didn't set the source so this always failed. Also check if the C fallback exists before trying to symlink/copy, otherwise we crash if C isn't the first lang we try.
2019-04-29Fix unused variables warningsDaniel Mensinger1-1/+1
2019-04-29Fix blind exceptionsDaniel Mensinger1-1/+1
2019-04-25Don't use len() to test for container emptinessDylan Baker4-11/+11
I ran the numbers once before (it's in the meson history) but it's *much* faster to *not* use len for testing if a container is empty or not.
2019-04-24Add gcovr 4.2 supportRichard Kjerstadius1-16/+13
The out-of-source build syntax for gcovr 4.2 is different compared to previous versions and therefore an update was needed. In researching the most appropriate solution it was found that any gcovr version older than 3.3 always resulted in 0% coverage. Because of this, rather than adding an additional layer of logic, some already existing logic was modified to ensure correct syntax for the new version, while versions older than 3.3 are flagged as not supported. Closes mesonbuild#5089.
2019-04-22Update list of potential scan-build binaries. Closes #5287.Jussi Pakkanen1-3/+6
2019-04-22i18n: add args keyword to merge_fileKonstantin1-1/+2
* i18n: add args keyword to merge_file * i18n: add testcase to msgfmt args
2019-04-21dist: recurse into git submodulesVladimír Čunát1-1/+1
2019-04-04Add symbol sizes to .symbols filesArkadiusz Hiler1-1/+8
If we change a symbol size (e.g. array) in a .c file that is a part of .so, executables that use it are not re-linked resulting in a runtime error: "Symbol xyz has different size in shared object, consider re-linking" Adding symbol sizes to .symbol files fixes this issue.