Ninja backend will fail to find the vs dep dependency
prefix string in a mingw64 environment. This change
simply updates the regex to be able to capture mingw64's unique
file separation pattern.
When `self.wrap.filesdir` is a relative path, which happens when
`meson subprojects update` is run, the path to the patch must be
provided relative to the working directory in which `patch` or `git`
is run.
`self.wrap.filesdir` is absolute when `Resolve()` is invoked by the
Meson interpreter, which is why this wasn't detected by the tests.
It saves bandwidth and disk usage on downloaded subprojects, and people
very rarely need more than the single commit they’re using.
Add `depth=1` to the `[wrap-git]` examples in the rest of the
documentation, to make it more likely that people will copy-and-paste it
into their `.wrap` files.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
Specifically, this is a combination of the following:
- Revert "visualstudio.py: Apply /utf-8 only on clang or VS2015+"
This reverts commit 6e7c3efa79.
- Revert "Visual Studio: Only use /utf-8 on VS2015 or later or clang-cl"
This reverts commit 8ed151bbd7.
The changes were broken and untested, although this is because of a lack
of general CI testing for all languages on Windows. At least, this broke
the use of ifort, and possibly more.
The changes are fundamentally a bit "exciting", as they step out of the
hierarchy of compiler definitions and apply arguments almost willy-nilly.
And apparently it's leaky all over the place. I don't understand all of
what is going on with it, but it plainly failed to achieve its desired
goal and needs to be rolled back ASAP.
This enables the fortran tests for Azure.
We only test on x64, because:
- ifort isn't arm64 compatible
- x86 may in theory exist, but Meson reports it cannot compile
executables
These checked that e.g. the cpp and fc ids are identical, which isn't
strictly what we want. Particularly, msvc doesn't even have a fortran
compiler, and what we really care about is whether we mix both gcc and
something else.
This removes one line of stderr output per GObject Introspection file
processed, e.g.
g-ir-scanner: link: gcc -o Fwupd-2.0 Fwupd-2.0.o -L. -Wl,-rpath...
This error message was quite confusing when triggered by
use of an absolute path to the include dir of an external dependency
(numpy in my case). Changing that to a relative dir also isn't
a solution, because Meson will *not* do the "busywork to make paths
work" that the error message says it will.
Transpilers need to run on the build machine in order to generate their
output, which can then be taken by a cross-compiler to create the final
output.
For the same reasons commit 7aa28456d ("Add dependency type for
Valgrind") removed linking with valgrind, pkgconfig shouldn't generate
"Requirements" for it, in general.
This solves dbus meson port question/issue from:
https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/303#note_1444819
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
MachineChoice is a mesonlib object, not a compilers object, so it makes
no sense to import it from the latter simply because the latter imports
it too. This results in brittle module dependencies and everything
breaking when a refactor removes it from the latter.
... also it is a typing-only import so while we are fixing it to import
from the right place, we can also put it in a type-checking block.
This is undefined behaviour, and seems to have caused test failures
when backporting Meson to an older toolchain in the Steam Runtime.
Signed-off-by: Simon McVittie <smcv@collabora.com>
We want to talk about the kwargs to the custom_target() function, but
tried to link to custom_tgt instead, which is not a function. It is an
object, but this was the wrong reference method for a type.
We want the function anyway, so use that.
The end of the paragraph indicates that the options which support --foo
will be listed in the help text. The beginning of the paragraph seems to
suggest the same thing, except it doesn't distinguish between -Dfoo and
--foo style options.
The first mention is redundant and feels like the wrong part of the
paragraph to mention it anyway.
With the previous commit, we made this smartly detect when parentheses
are not needed. But the example was broken, because it doesn't follow
its own documented rules to use `[[#` syntax. Add the missing hash
character.
If we link to
```meson
[[#function]]('posarg')
```
then the ideal linkification would operate on "function" in the
formatted text:
```
function('posarg')
```
Instead, it operated on "function()" in the formatted text:
```
function()('posarg')
```
Fix this by detecting the next character after the reference, and
skipping the usual "automatically append the () for you" stage if it
already has that opening parenthesis.
The old implementation assumed a path is of Windows iff the second
character is a colon. However, that is not always true.
First, a colon can be included in a non-Windows path. For example, it is
totally fine to have a directory named ':' on Linux 5.17.0 tmpfs.
Second, a Windows path may start with \\ for UNC or extended length.
Use pathlib to handle all of these cases.
Regardless of which MachineChoice we base the platform on, we compare
its value to lowercased identifiers. So we need to lowercase the
targetplatform too... but we only did so sometimes.
This broke e.g. on "Win32", but only when *not* doing a cross build.
Fixes#10539
We have to handle this, because Windows needs to link to the implib of
the executable (???) in order to create a shared module. This is
explicitly checked for and handled in the backend, and creating a build
target with `link_with: some_exe` still works, even. But updating
declare_dependency to typed_kwargs neglected to take that into account,
so creating a convenience interface for those same arguments failed.