summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-04-27mdist: gracefully handle stale Git indexBenjamin Gilbert
Running `touch` on a tracked file in Git, to update its timestamp, and then running `meson dist` would cause dist to fail: ERROR: Repository has uncommitted changes that will not be included in the dist tarball Use --allow-dirty to ignore the warning and proceed anyway Unlike `git status` and `git diff`, `git diff-index` doesn't refresh the index before comparing, so stat changes are assumed to imply content changes. Run `git update-index -q --refresh` first to refresh the index. Fixes: #12985
2024-04-27compilers/fortran: fix werror options for Intel compilersBenjamin Gilbert
Unlike in the Intel C compiler, -Werror and /WX are not accepted.
2024-04-27backend/ninja: use generate_basic_compiler_args() for C#, Java, SwiftBenjamin Gilbert
C#, Java, and Swift targets were manually collecting compiler arguments rather than using the helper function for this purpose. This caused each target type to add arguments in a different order, and to forget to add some arguments respectively: C#: /nologo, -warnaserror Java: warning level (-nowarn, -Xlint:all, -Xdoclint:all), debug arguments (-g, -g:none), -Werror Swift: -warnings-as-errors Fix this. Also fix up some no-longer-unused argument processing in the Compiler implementations.
2024-04-27Added NumPy to usersDr. Vedran Miletić
NumPy is built with Meson since version 1.26.
2024-04-26nasm: Fallback to native compiler when cross compilingXavier Claessens
If nasm is not defined in cross file binaries we can fallback to build machine nasm. When cross compiling C code we need a different gcc binary for native and cross targets, e.g. `gcc` and `x86_64-w64-mingw32-gcc`. But when cross compiling NASM code the compiler is the same, it is the source code that has to be made for the target platform. We can thus use nasm from build machine's PATH to cross compile for Windows on Linux for example. The difference is the arguments Meson will pass when invoking nasm e.g. `-fwin64`. That is already handled by NasmCompiler class.
2024-04-25tests/d/10: Fix condition with clang++ and gdcDylan Baker
Which just checked for clang++ and aborted, instead of for the combination it claimed.
2024-04-25CI: ubuntu-rolling: fix configuration for sources after format changeEli Schwartz
``` # Ubuntu sources have moved to the /etc/apt/sources.list.d/ubuntu.sources # file, which uses the deb822 format. Use deb822-formatted .sources files # to manage package sources in the /etc/apt/sources.list.d/ directory. # See the sources.list(5) manual page for details. ``` Adapt to the new format.
2024-04-25CI: gentoo: fix profile 23.0 migration dropping default fortranEli Schwartz
We need this for scalapack -> virtual/mpi -> openmpi See https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a1b86025be85171281811eaced7b342fbdfdb591 We now get an immediate, very nicely readable error that the USE flag is necessary. For our use cases, there's no reason not to globally enable it.
2024-04-25docs: fix bad link in snippetDylan Baker
2024-04-25Catch Python exception in the event alignment can't be converted to intTristan Partin
The user almost certainly has to be using a compiler wrapper script that doesn't actually work if we land here. Fixes: #12982
2024-04-25find_library: improve the docs and FeatureNew to fully describe the changeEli Schwartz
The docs didn't really explain what the issue was with using it. And it's not actually a "crash" either way. The FeatureNew mentions that "name" is new, but it is standard for these warnings to tell you both the type of object you're operating on and the name of the method that is an issue. This omitted the former, and was very confusing.
2024-04-25dependencies/boost: Add new homebrew rootDylan Baker
On Apple Silicon the default search path is /opt/homebrew instead of /usr/local.
2024-04-25tests: bump C++ requirement of has_header_symbolDylan Baker
Boost now requires C++ 14, as of 1.82
2024-04-25CI/MacOS: move some things out of the run script into the env keyDylan Baker
2024-04-25CI/MacOS: add missing packagesDylan Baker
There are some additional packages that seem to be needed on Apple based Silicon.
2024-04-25CI/MacOS: Fix paths that have changed from /usr/local to /opt/homebrewDylan Baker
homebrew installs to /usr/local on Intel based macs, but has moved to /opt/homebrew for those using Apple Silicon.
2024-04-25CI/MacOS: switch the Qt4 job to run on an Intel MacDylan Baker
Qt4 doesn't seem to work on Apple Silicon because OpenSSL 1.0 (a requirement for Qt4) doesn't build on it correctly, trying to use X86 assembly.
2024-04-24rust: Fix warning_level=everything caseXavier Claessens
Fixes: #13100
2024-04-24backend/ninja: use re.match instead of re.searchDylan Baker
Since we've already determined that the first character is the start of the expression anyway.
2024-04-24backend: fix type annotation of Backend.generateDylan Baker
`func(value: dict = None)` is invalid, it must be `func(value: dict | None = None)`, or in our older syntax: `T.Optional[T.Dict] = None`
2024-04-24backend/ninja: Fix bug in NinjaRule.length_estimateDylan Baker
The code would create a dictionary that was of type `str : list[str] | str | None`. Then would later try to call `len(' '.join(dict[key]))`. This would result in two different bugs: 1. If the value is `None` it would except, since None isn't iterable and cannot be converted to a string 2. If the value was a string, then it would double the length of the actual string and return that, by adding a space between each character
2024-04-24backend/ninja: add typing annotations to NinjaRuleDylan Baker
2024-04-24docs: Add CMake build type release note snippetJouke Witteveen
2024-04-24cmake/interpreter: Annotate and style module-level constantsJouke Witteveen
2024-04-24Merge pull request #13112 from DaanDeMeyer/interactiveJussi Pakkanen
Add meson test --interactive
2024-04-23Use dl instead of zlib for checking an external dependencyTristan Partin
Fedora has switched to zlib-ng, which has a version of `1.3.0.zlib-ng`, causing AllPlatformTests.test_summary to fail. dl is much less likely to change format.
2024-04-23mtest: Connect /dev/null to stdin when not running in interactive modeDaan De Meyer
This allows tests to check whether stdin is a tty to figure out if they're running in interactive mode or not. It also makes sure that tests that are not running in interactive mode don't inadvertendly try to read from stdin.
2024-04-23Add meson test --interactiveDaan De Meyer
This is very similar to --gdb, except it doesn't spawn GDB, but connects stdin/stdout/stderr directly to the test itself. This allows interacting with integration tests that spawn a shell in a container or virtual machine when the test fails. In systemd we're migrating our integration tests to run using the meson test runner. We want to allow interactive debugging of failed tests directly in the virtual machine or container that is spawned to run the test. To make this possible, we need meson test to connect stdin/stdout/stderr of the test directly to the user's terminal, just like is done with the --gdb option.
2024-04-23interpreter: implement the `name()` method for `ExternalLibraryHolder`Dylan Baker
This allows `cc.find_library().name()` to work, just like `dependency().name()`. Fixes: #13053
2024-04-23Fix compile.links for valaBen Corby
Fixes issue #12959 compiler.links command for vala crashes
2024-04-23Pass --quiet to glib-genmarshalTristan Partin
No need to spam about reading the input file. Fixes: #13119
2024-04-23Add a few more notes to the style guideJohn Ericson
- Mention 2 space indent seems to be the most idiomatic - Mention trailing commas are good - Update example to use trailing commas
2024-04-22docs: fix a typo of pathWu, Zhenyu
Refer https://github.com/mesonbuild/meson/blob/master/docs/markdown/Machine-files.md?plain=1#L285
2024-04-22add an error message for targets that are not dependenciesMomtchil Momtchev
2024-04-22coredata: Fix is_per_machine_option() for builtinsOle André Vadla Ravnås
The keys in BUILTIN_OPTIONS_PER_MACHINE are OptionKey values, not strings. This fixes a regression introduced in 71db6b0.
2024-04-22Merge pull request #12808 from U2FsdGVkX1/masterJussi Pakkanen
Fix ninja cannot find the library when libraries contain symlinks.
2024-04-18backend/ninja: Fix cases where None is passed when unexpectedDylan Baker
When getting debug file arguments we can sometimes pass None, where a None is unexpected. This becomes a particular problem in the Cuda compiler, where the output will unconditionally be concatenated with a static string, resulting in an uncaught exception. This is really easy to spot once we annotate the functions in question, where a static type checker like mypy easily spots the issue. This commit adds those annotations, and then fixes the resulting error. Fixes: #12997
2024-04-16python: Fix header check for system methodJonathon Anderson
Fixes https://github.com/mesonbuild/meson/issues/12862
2024-04-15tests: fix missing dependency causing flaky build failureEli Schwartz
We have two copies of other.h, one of which is generated. If we don't include the include/ directory then building fails unless the custom_target which copies it over, happens to run early enough. On parallel builds this may fall on its face.
2024-04-15allow any alternative python freeze tool to work with mesonEli Schwartz
Any code that needs to know mesonlib.python_command currently assumes the PyInstaller bundle reference is added to the sys module, which means that it assumes the only freeze tool used is PyInstaller. Really, all we need to check is sys.frozen as it's never normally set, but always set for a freeze. We don't care if it was PyInstaller specifically, and we don't need its bundle directory. See https://github.com/mesonbuild/meson/discussions/13007
2024-04-15compilers: fix crash when compiler check returns None outputEli Schwartz
Popen_safe_logged has a small inefficiency. It evaluates the stripped version of stdout/stderr before checking if it exists, for logging purposes. This would sometimes crash, if it was None instead of ''. Fixes #12979
2024-04-15micro-optimize iteration of evaluated setEli Schwartz
It is generally accepted practice to convert dict.keys() to a list before iterating over it and e.g. deleting values, as keys returns a live-action view. In this case, we use the difference of *two* dict keys, which returns a regular non-view set and doesn't need protecting. Iteration order doesn't matter (the set already randomizes it anyway). Avoid the cost of converting to a list.
2024-04-15Add bztar support to meson distTristan Partin
Some projects, like Postgres, distribute code in this format.
2024-04-15Don't sanitize a None path when checking for, but could not find, ↵William D. Jones
unsupported cl clones.
2024-04-14Fix builds with Ninja 12 and remove a 5 year old workaround.Jussi Pakkanen
2024-04-14Clarify mutable objects usageXavier Claessens
Only Environment and ConfigurationData are mutable. However, only ConfigurationData becomes immutable after first use which is inconsistent. This deprecates modification after first use of Environment object and clarify documentation.
2024-04-14Merge pull request #11737 from ↵Jussi Pakkanen
amyspark/amyspark/add-nasm-building-rules-to-xcode backends: Add Nasm build rules to Xcode
2024-04-12docs: Howto exclude file from unity buildPhilip Chimento
Adds a howto section describing how to put files in a separate build target and override the unity build setting, and why you might want to do this. Closes: #13031
2024-04-11dependencies/dev: make the warning about LLVM's CMake non-fatalDylan Baker
This isn't case where fatal is appropriate, as the end user has no control over this, and it may not be hit in all configurations of a project.
2024-04-11dependencies/llvm: Try to make warning about CMake betterDylan Baker
We have seen a number of bugs from people confused by warning that the need both a C and C++ compiler to use the CMake method. This attempts to provide a more helpful error message.