aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-02-25interpreterbase: fix ObjectHolderDylan Baker1-3/+3
There are two problems: 1. It doesn't take the generic type as a parameter 2. it sets subpproject to None, but expects to always get a string
2021-02-25Support multiple args in error()Xavier Claessens4-23/+24
Seems it got forgotten when that was added to warnings() and message(). Fixes: #8414.
2021-02-25Allow custom target output to be processed by generatorsMatthias Klumpp6-23/+67
2021-02-25Clarify that wrap requests are for user submission. [skip ci]Jussi Pakkanen1-2/+9
2021-02-23mcompile: do not pass the builddir to ninja if it is the current directoryEli Schwartz1-1/+3
Because when you don't specify -C, this logging feels silly: ninja: Entering directory `.
2021-02-23mcompile: make sure arguments are passed in the correct orderEli Schwartz1-7/+8
meson compile itself doesn't permit GNU-style argument permutation, i.e. TARGET to precede options, so why should we expect ninja to? And indeed, ninja doesn't document support for this -- but it does accept it anyway, which is confusing and results in people thinking it's "supposed to" work. However, if NINJA=samu then this is in fact enforced. samu does not permit GNU-style argument permutation. As a result, the arguments passed to mcompile are actively re-ordered before being passed to the subprocess, and samu dies with a fatal error. Fix ordering in mcompile.py and add a comment to warn future readers that the order does, in fact, matter.
2021-02-23rust: replace for loop with any()Dylan Baker1-4/+1
This is a little cleaner, and short circuits correctly, unlike the loop it replaces
2021-02-23rust: fix linking with external dependenciesDylan Baker2-1/+21
Rust can link with any dependency that uses c linkage, which is pretty much what we assume across the board anyway.
2021-02-23Add note about using Ninja on old Meson versions. [skip ci]Jussi Pakkanen1-1/+3
2021-02-23tests/rust: Add rust case linking to zlib dependencyJordan Justen5-0/+59
Reworks: * Add MESON_SKIP_TEST error for darwin from polyglot test * Remove dependencies from executable Dylan's changes: * Add support for both static and shared testing * Test with pkg-config, cmake, and system * reformat to meson's style Co-authored-by: Dylan Baker <dylan@pnwbakers.com>
2021-02-23add a script to run a single testDylan Baker3-1/+92
As a Meson developer it's often frustrating to have a single functional test with a regression. These tests can be awkward to reproduce, especially when they make use of a test.json file. This script provides a simmple interface to call functional tests 1 at a time, regardless of whether they use a test.json or not. If they do use a test.json, and have a matrix, then the `--subtest` option can be used to select spcific combinations, for example: ```sh ./run_single_test.py "test cases/frameworks/15 llvm" --subtest 1 ``` will run only the second (zero indexed of course) subtest from the llvm test cases. This is not a super elegent script, but this is super useful.
2021-02-23run_*_tests: Add some type annotationsDylan Baker2-15/+27
2021-02-23run_project_tests: Delete a build directory if it already existsDylan Baker1-0/+2
This can happen if you abort a run before the cleanup finishes
2021-02-23run_project_tests: split json parsing code from test gathering codeDylan Baker1-113/+123
2021-02-22[CUDA] Bugfix: Forward sanitizer_*_args() methods to host compiler.Olexa Bilaniuk3-0/+40
Enables -Db_sanitize=undefined and company. Also serves as a testcase for NVCC comma-shielding: Because the test- case declares `b_sanitize=address,undefined`, the host GCC compiler needs `-fsanitize=address,undefined`, but this stands a danger of being split by NVCC when wrapped with `-Xcompiler=args,args`. Special, already-existing comma-shielding codepaths activate to prevent this splitting. Closes #8394.
2021-02-22minstall: Add --skip-subprojects optionXavier Claessens21-77/+195
By default all subprojects are installed. If --skip-subprojects is given with no value only the main project is installed. If --skip-subprojects is given with a value, it should be a coma separated list of subprojects to skip and all others will be installed. Fixes: #2550.
2021-02-21docs/users: Add DOSBox StagingPatryk Obara1-0/+1
2021-02-19Fix combining C and Fortran. Closes #8377.Jussi Pakkanen3-4/+23
2021-02-19[TAP] Fix TAP parser when test exits with statusLuke Drummond3-1/+12
Some time between 0.56 and 0.57 the TAP parser broke when a test exits with a nonzero status. The TAP protocol does not specify this behaviour - giving latitude to implementers, and meson's previous behaviour was to report the exit status gracefully. This patch restores the old behaviour and adds a regression test
2021-02-19Ensure that $lang_args and $lang_link_args are properly parsedDylan Baker4-16/+41
Currently we don't handle things correctly if we get a string we should split, and the linker and needs compiler arguments. It would result in two unsplit strings in a list, instead of the split arguments in a list Fixes: #8348
2021-02-18environment: Allow setting build options in cross filesDylan Baker1-4/+11
This did work previously, so we need to let it continue working. I'm proposing removing it in 0.60 because the correct solution has always worked. I've also been a bit more defensive here, and made setting `subproject:opt = foo` in the machine files an error, as we have `[subproject:built-in options]` or `[subproject:project options]` for that.
2021-02-18allow build.b_* optionsDylan Baker2-2/+6
These continue to be ignored as they always have, but no longer raise an error. Fixes: #8354
2021-02-18compilers: clang: Drop -Xclang before -fcolor-diagnostics flagKrzysztof Małysa1-3/+3
Using -Xclang -fcolor-diagnostics provides no advantage to using just -fcolor-diagnostics option and sometimes causes problems: * uncolored diagnostics on Arch Linux: https://bugs.archlinux.org/task/69662 * simple problem with removing flag -fcolor-diagnostics: https://github.com/clangd/clangd/issues/279
2021-02-18Increase OpenMPI timeout to see if it fixes macOS CI test hangs.Jussi Pakkanen1-3/+3
2021-02-18Disable failing Cygwin GIR test.Jussi Pakkanen6-0/+22
2021-02-18Don't access other enum members from selfMiro Hrončok1-3/+4
This is deprecated in Python 3.10. Instead, acces them from the class. Fixes https://github.com/mesonbuild/meson/issues/8318
2021-02-17ci: Fix failure in unit tests with vs backendXavier Claessens2-3/+3
2021-02-17unittests: expect mtest logs to be utf-8Paolo Bonzini1-7/+7
2021-02-17mtest: use / as path separator for ninja targetsPaolo Bonzini1-1/+7
os.path.relpath(f, wd) returns path with \ seperator on Windows, but ninja targets always uses / separator. See for example https://gitlab.freedesktop.org/ocrete/libnice/-/jobs/7348274. Analyzed-by: Xavier Claessens <xavier.claessens@collabora.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-02-17compilers: Only insert -flto-jobs in clang's link argumentsDylan Baker4-8/+18
Clang has a hand `-Wunused-command-line-argument` switch, which when turned to an error, gets very grump about `-flto-jobs=0` being set in the compiler arguments (although `-flto=` belongs there). We'll refactor a bit to put that only in the link arguments. GCC doesn't have this probably because, a) it doesn't have an equivalent warning, and b) it uses `-flto=<$numthreads. Fixes: #8347
2021-02-17Do not validate options when finding non-matchingDylan Baker4-5/+22
This is a) useless because it's only used to print which options are not default, and b) harmful because it can result in cases where things break, like in projects that set a standard that the chosen compiler doesn't support, but the project (or some subset) can be built with a different standard. Fixes: #8360
2021-02-17Substitute @CURRENT_SOURCE_DIR@ in run_target() and custom_target()Xavier Claessens5-3/+54
run_target() does some variable substitutions since 0.57.0. This is a new behavior, and undocumented, caused by sharing more code with custom_target(). More consistency is better, so document it now. custom_target() was doing variable substitution in the past, because it shared some code with generator(), but that was undocumented. Some refactoring in 0.57.0 caused it to not replace @CURRENT_SOURCE_DIR@, @SOURCE_DIR@, and @BUILD_DIR@ anymore. This patch adds back @CURRENT_SOURCE_DIR@ and document it. It does not add back @SOURCE_DIR@ because it is duplicate with @SOURCE_ROOT@ that has a better name. Also do not add back @BUILD_DIR@ which is duplicate of @PRIVATE_DIR@, and not @BUILD_ROOT@ surprisingly, adding to the confusion.
2021-02-17mconf: only print correct options in the correct sectionsDylan Baker1-2/+2
A predicate in two comprehensions was dropped, in what looks like a rebase error on my part. With the predicate added things work correctly. Fixes: #8344
2021-02-17Environment: Fix passing envrionment variables CPPFLAGS and CFLAGSDylan Baker6-8/+60
Or other language flags that use CPPFLAGS (like CXXFLAGS). The problem here is actually rather simple, `dict.setdefault()` doesn't work like I thought it did, I thought it created a weak entry, but it actually is equivalent to: ```python if k not in dict: dict[k] = v ``` Instead we'll use an intermediate dictionary (a default dictionary actually, since that makes things a little cleaner) and then add the keys from that dict to self.options as applicable. Test case written by Jussi, Fix by Dylan Co-authored-by: Jussi Pakkanen Fixes: #8361 Fixes: #8345
2021-02-16Merge pull request #8355 from obilaniu/cudafixesDylan Baker5-41/+419
CUDA Compiler Fixes
2021-02-16Small patch to unittests to initialize CUDA compiler correctly.Olexa Bilaniuk1-1/+1
Suggested by Dylan Baker.
2021-02-16Add optional -Dcuda_ccbindir= option and -ccbin flag to CUDA compiler.Olexa Bilaniuk2-8/+33
Closes #8110.
2021-02-16Armour-grade quoting to account for NVCC's -Xcompiler peculiarities.Olexa Bilaniuk1-14/+84
2021-02-16Extensive rewrite of GCC/MVSC flag translation to NVCC flags.Olexa Bilaniuk1-31/+313
2021-02-16Add default debug flags for two configurations to NVCC.Olexa Bilaniuk1-2/+2
2021-02-16CUDA Toolkit 11.2.1 has been released, update version tableOlexa Bilaniuk1-1/+2
Strangely, the minimum version of CUDA Toolkit 11.2.0 has also been updated - downwards. We pick up this change as well.
2021-02-16Fix VS C++ module support.Jussi Pakkanen1-1/+2
2021-02-16Fix destdir detection for installation via polkitXℹ Ruoyao1-1/+1
In 0.57.0 installation via polkit won't work anymore. `destdir` is defaulted to an empty string ('') instead of None. But polkit installation code incorrectly tests `destdir is None`.
2021-02-16Add missing apostrophes. [skip ci]Jussi Pakkanen1-2/+2
2021-02-14docs: Fix typo in release notes [skip ci]Sam Thursfield1-1/+1
Mismatched \` symbol was messing up the formatting.
2021-02-14Add a release note entry for C++ modules which was missing. [skip ci]Jussi Pakkanen1-1/+8
2021-02-14Bump version for new development.Jussi Pakkanen1-1/+1
2021-02-14Set up release 0.57.0.57.0Jussi Pakkanen34-316/+355
2021-02-14aix: avoid -bsvr4 flagPeter Harris1-9/+22
The svr4 linker flag causes issues, especially when compiling c++. Replace '-z' options with the equivalent non-svr4 flags. When using -blibpath, we must be careful to include the default system library path, or the resulting executables will not be able to find libc. This patch was suggested by @andreaskem in #7581.
2021-02-14Add custom entyr to cuda buildtype dict. Closes #8336.Jussi Pakkanen1-0/+1