aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-02-01remove unneeded type commentEli Schwartz1-1/+1
2023-02-01simplify instantiation of builtin type using builtins instead of functionsEli Schwartz6-17/+47
2023-02-01micro-optimize: define typing-only objects in TYPE_CHECKINGEli Schwartz9-54/+45
Union types that exist solely for use as annotations don't need to be created in normal runs.
2023-02-01treewide: add future annotations importEli Schwartz105-5/+122
2023-02-01pyupgrade: use set literalEli Schwartz1-1/+1
2023-02-01add cc.has_function_attribute('vector_size')Dudemanguy3-0/+6
2023-02-01remove /utf-8 option when /validate-charset- is presentCharles Brunet2-1/+25
2023-01-31cuda: enable C++20 for CUDA 12David Seifert1-2/+15
https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html#cuda-compilers
2023-01-31log running commands a bit better by doing proper shell quotingEli Schwartz2-4/+4
2023-01-30runpython: make it work for -c as wellEli Schwartz2-4/+19
In commit 4e4f97edb3d475273108b203bc02b04bd6840b06 we added support for runpython to accept `-c 'code to execute'` in addition to just script files. However, doing so would mangle the sys.argv in the executed code -- which assumes, as python itself does, that argv is the stuff after the code to execute. We correctly handled this for script files, but the original addition of -c support pushed this handling into a script-file specific block.
2023-01-29mlog: do not squelch console output for errorsEli Schwartz1-1/+7
We have functionality to squelch logging, and we use this for situations where we run a fake interpreter and then emit output. e.g. `introspect`. It's reasonable to avoid logging your bog-standard noisy `mlog.log()` here, but unfortunately, we also avoided logging the output of `mlog.exception()` followed by `sys.exit(2)`, because that went through mlog! :P Special-case this to keep on printing, even if mlog.disable() was used -- in such a case, we really do want to emit log output no matter what. Users need this info to ensure they have any clue why Meson returned a non-zero exit code.
2023-01-29introspect: avoid crashing when add_languages for an optional language failsEli Schwartz1-6/+16
Because that is what the real interpreter does, too. It logs a failure and carries on.
2023-01-29Users.md: add @dcantrell /bsdutilsandy59951-0/+1
2023-01-28tests/llvm: require cmake 3.11Konstantin1-1/+4
This is a weird but working way to skip this test from running on bionic (where it should not run).
2023-01-28cmake: allow dynamic linking with LLVMKonstantin5-73/+250
llvm-config is unsuitable for standard cross-compile, because we need to build llvm especially for it, which is not done is almost any distros, so, for example, standard bootstrap chroot will be unsuitable. This patch is trying to acheive feature parity between config-tool searching of LLVM and CMake-based one, which is arch-agnostic. Signed-off-by: Konstantin <ria.freelander@gmail.com>
2023-01-26gnome: Deduplicate include dirs to generate girThibault Saunier1-3/+3
Ensuring the order is respected
2023-01-25tests: avoid unexpected failure when cmake is not installedEli Schwartz1-1/+2
This test case checks stdout and demands a `dependency()` lookup fail. The resulting error message can be different depending on whether cmake is installed, or not. For cmake-specific tests we would simply skip the test if cmake is not installed, but here we can just fine-tune the pattern matching we use to determine if the test failed "correctly". Fixes #11320
2023-01-22mtest: do not warn when the TAP stream version is 12Eli Schwartz1-4/+1
Partial rollback of commit b7a5c384a1f1ba80c09904e7ef4f5160bdae3345. The rationale was based on a confusing wording of the TAP14 spec, which is under discussion for clarification / amendment. TAP14 doesn't (shouldn't) really say that missing a version line is potentially an error. Rather, this is the correct way to denote TAP12, which a TAP14 harness may not understand or try to parse. The intention was never to suggest that harnesses "should" take exception to the missing version line on the grounds that one should really add a version line. So, stop emitting an annoying warning for something that's valid usage. Meson understands TAP12 and that's okay. However, we do need to keep the part of that commit which set the version to 12 if it was otherwise unspecified. But instead of distinguishing between None and a version, just default to 12.
2023-01-22Revert "debug cygwin CI"Eli Schwartz1-1/+0
This reverts commit 79d7891746a7864a1407d48eac8a753b225ec6c3. This debug print probably should not have ended up live. Moreover, the function it debugs is, surprisingly, called rather often. Adding I/O to it causes it to begin to noticeably lag, on the scale of adding actual *minutes* to a setup run. Fixes #11322
2023-01-22meson init --build should call meson setup and vsenvCharles Brunet1-2/+8
2023-01-20Haiku pkgconfig directory layout supportX5121-0/+3
2023-01-20haiku: set default prefix and library pathsX5122-9/+66
2023-01-20devenv should import env vars from vsenvCharles Brunet1-2/+1
2023-01-20docs: Qt compile_moc() parameter errorgroveer1-1/+1
"extra_arguments" should be "extra_args"
2023-01-20optinterpreter: pass deprecated keyword directly to Option initializerDylan Baker1-15/+17
2023-01-20Deprecate passing strings to non-string optionsDylan Baker6-3/+28
Currently Meson allow the following (Muon does not): ```meson option('foo', type : 'boolean', value : 'true') option('bar', type : 'integer', value : '42') ``` This is possibly a holdover from very old code, but it's a bad idea and we should stop doing it. This deprecation is the first stop on that journey.
2023-01-20use typed_kwargs for the various option subparsersDylan Baker2-74/+123
We make use of allow_unknown=True here, which allows us to only look at the common arguments in the main option parser, and then look at the specific options in the dispatched parsers. This allows us to do more specific checking on a per overload basis.
2023-01-20decorators: don't unsort sorted values for printingDylan Baker1-2/+3
Currently in our deprecated/new feature printing we carefully sort all of the values, then put them in a set to print them. Which unsorts them. I'm assuming this was done because a set looks nice when printed (which is true). Let's keep the formatting, but print them in a stable order.
2023-01-20coredata: allow deprecation to be passed to Option initializerDylan Baker1-17/+24
Instead of requiring it to be set outside the initializer
2023-01-20coredata: get rid of UserArrayOption `**kwargs`Dylan Baker1-2/+5
Let's just pass the two arguments explicitly.
2023-01-20coredata: use DEFAULT_YIELDING as the default value for OptionsDylan Baker2-12/+12
Instead of setting it to `Optional[bool] = None`, and then in the initializer replacing `None` with `DEFAULT_YIELDING`, just set to to `bool = DEFAULT_YIELDING`
2023-01-20coredata: use a frozenset instead of a dict where values are always NoneDylan Baker2-24/+25
2023-01-20remove dead codeEli Schwartz1-47/+0
We shouldn't be hardcoding library dirs anyway. And we usually get this from the compiler. This function has been unused since its users were moved to use the compiler method, in the following commits: - a1a4f66e6d915c1f6aae2ead02cf5631b10c76f1 - a3856be1d50eaefe32fee5d3347d55d934d15b50 - 08224dafcba1b694fb624553e7d84deb565aae22
2023-01-18dependencies: fix pcap-config which now errors on --versionEli Schwartz2-2/+18
The latest release of libpcap added argument validation to pcap-config, but still doesn't support --version. The next version of libpcap will support --version. Add support for config-tool dependencies which expect to break on --version, to fallback to an option that does not error out or print version info, for sanity checking.
2023-01-18interpreter: use typed_pos_args for build_targetsDylan Baker1-11/+48
We have to allow through build.BuildTarget and build.ExtractedObjects, which is what our previous level of checking did, even though they are ignored. I've used FeatureDeprecated calls here, so that we have a clear time of "this was officially deprecated in 1.1.0"
2023-01-18coredata: Make a deepcopy of global state before mutatingDylan Baker1-1/+3
When a compiler is initialized, it adds specific options that it supports, but taking some global UserOption objects and adding them to itself. When it does so, it mutates then if necessary. This means that each compiler initialized mutates global state, this is bad. This is worse because in our test suite we do in process testing, so these mutations are preserved *between tests*, potentially leading to incorrect results. The simple fix is to do the right thing, and copy the UserOption before mutating. A deepcopy is required because the option might be an ArrayOption, and a shallow copy is not sufficient in that case.
2023-01-18doc: Fix typo in release notesXavier Claessens1-1/+1
2023-01-18Fix typo in doc of sourceset moduleYue Yang1-1/+1
2023-01-18devenv: Allow dumping into file and select a formatXavier Claessens7-14/+83
It is often more useful to generate shell script than dumping to stdout. It is also important to be able to select the shell format. Formats currently implemented: - sh: Basic VAR=prepend_value:$VAR - export: Same as 'sh', but also export VAR - vscode: Same as 'sh', but without substitutions because they don't seems to work. To be used in launch.json's envFile.
2023-01-18 Fix nasm when target has threads as added dependencyGijs Peskens2-0/+20
2023-01-17mparser: Use a literal for the ComparisonNodeDylan Baker1-11/+18
And fix a bug where `not in` is in the wrong order.
2023-01-16properly type utils/core.py and add it to mypyEli Schwartz3-6/+11
EnvironmentVariables was always broken, it used MutableMapping because everyone <3 abstract interfaces, especially when they are broken and don't actually do what you want. This needs a dict interface, exposing `.copy()`. We either use a dict or os._Environ, and the latter also supports that. Also fix a broken import, and the fallout from forgetting to update the signature of self.envvars in commit b926374205bd761085031755c87152d08bc10e9d.
2023-01-15BUG: Fix generated sources not being included as dependencies in cython ↵Thomas Li5-0/+63
transpilation
2023-01-12tests: track when an entire category is skipped and be quieterEli Schwartz1-8/+10
There is no need to state for every single test that "preconditions were not met". And logging the skip reason for a single test is easy to read, but making every second line alternate is less so.
2023-01-12tests: properly log the reason why a test got unexpectedly skippedEli Schwartz1-1/+2
2023-01-11remove totally invalid gcc arguments from cross fileEli Schwartz1-2/+2
Partial revert of commit cf23e341878286790885352fd1d6548be5798391. This mostly moved existing arguments to the "right" location, but also introduced new arguments that didn't previously exist -- which was wrong. ... also, these cross files are used by CI (if they have a corresponding .json file) and this change broke the CI. Because --target isn't a valid gcc option, although clang/rustc do accept it. For GCC, the argument parser decides you wanted --target-help, which prints documentation text and then quits.
2023-01-11cross: move multilib options to [binaries] sectionPaolo Bonzini6-28/+25
c_args are meant to be overridden by the user if needed (even via the environment CFLAGS variables + -Doptimization=plain, for example), so they should not contain any option that affect the multilib search path. For example, a hypothetical native file like this: [binaries] c = gcc [built-in options] c_args = ['-m32'] would *not* build 32-bit binaries if -Dc_args is passed to meson. Such options, instead should be in the [binaries] section. Adjust the sample cross files included with meson. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2023-01-11coredata: Remove dead codeXavier Claessens1-11/+0
2023-01-10backends: Stop passing generator exes to ExecutableSerialisation as stringsDylan Baker10-7/+87
The code below this already handles being passed an Executable or ExternalProgram, and it does it correctly, since it handles host binaries that need an exe_wrapper correctly, while the code in the generator paths doesn't. The xcode backend is, like always, problematic, it doesn't handle things the same way as the ninja and vscode backends, and generates a shell script instead of using meson as a wrapper when needed (it seems likely that just forcing the meson path for xcode would be better). I don't have a working mac to develop a fix for, so I've left a todo comment there. Fixes: #11264
2023-01-10docs: Add ld64.lld to linker reference tableDylan Baker1-0/+1
I forgot to ask the original author to add this to the original MR (#11243)