Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
Rustc as of version 1.61.0 has support for controlling when
whole-archive linking takes place, previous to this it tried to make a
good guess about what you wanted, which worked most of the time. This is
now implemented.
Additionally, rustc makes some assumptions about library names
(specifically static names), that meson does not keep. This can be fixed
with rustc 1.67, where a new +verbatim modifier has been added. We can
then force rustc to use the name we give it. Before that, we can sneak
through `/WHOELARCHIVE:` in cases of dynamic linking (into a dll or
exe), but we can't force the archiver to do what we want (rustc
considers the archiver to be an implementation detail). The only
solution I can come up with is to copy the library to the format that
rustc expects. I've run into some issues with that as well, so we warn
in that case.
The decisions to leave static into static broken on MSVC for 1.61–1.66
was made because:
1) The work around is non-trivial, and we would have to support that
workaround for a long time
2) The number of users of Rust in Meson is small
3) The number of users of Rust in Meson on Windows, with MSVC is tiny
4) Using rustup to update rustc on windows is trivial, and solves the
problem completely
Fixes: #10723
Fixes: #11247
Co-authored-by: Nirbheek Chauhan <nirbheek@centricular.com>
|
|
This workaround was never exclusive to python2, and in fact only just
got fixed in the upcoming python 3.12 release. Extend the version
comparison to cover all those other cases.
(cherry picked from commit b4e792f520b2422a3980ea74fbc566c1b332a38d)
[backported to apply pre-code move]
# Conflicts:
# mesonbuild/dependencies/python.py
|
|
Only search for and provide linkage to libpython, if the dependency
expects to be linked to it. Fixes overlinking on Linux / macOS when
pkg-config isn't installed and the sysconfig lookup is used instead.
This was correctly handled for pkg-config rather than deferring it until
use, since commit bf832743441a1171518d7a436164c989be679410 -- but that
handling neglected to cover sysconfig dependencies. And sysconfig would
always try to link to libpython, it just respected the dependency
configuration barely enough to allow falling back to "don't link" if
both link_libpython=False and the library wasn't found.
(cherry picked from commit d3148efe4f469412fbd1d7771b36e3082467979d)
[backported to apply pre-code move]
# Conflicts:
# mesonbuild/dependencies/python.py
|
|
We may or may not care that the library can be found. If link_libpython
is false, we allow it to be missing and still find the dependency.
(cherry picked from commit e22dd4345cad8e28536c83921a83915d50b56c69)
[backported to apply pre-code move]
# Conflicts:
# mesonbuild/dependencies/python.py
|
|
|
|
This can raise any OSError, but we only caught two of them that indicate
a particular failure case. Also catch the generic error form with a more
generic message.
This produces better error messages in cases where e.g. exclusive lock
is not supported.
|
|
gpgme has decided that config-tool is bad, which makes sense. They've
also decided that they will only install theirs, if gpg-error also
installs one, which is a bit... confusing. Anyway, it's impossible to
know whether it should or should not exist, so just accept that this
test is ready to be skipped on distros that currently no longer have
this ancient config-tool script.
Victory is within reach!
|
|
The current check results in *any* value to `export_dynamic` generating
vala import targets, even `false`. This is pretty clearly wrong, as it
really wants to treat an unset export_dynamic as false.
|
|
clang++ main.cpp -fprofile-correction
clang-15: warning: optimization flag '-fprofile-correction' is not supported
[-Wignored-optimization-argument]
|
|
If someone specifies a binary in a machine file, but the resulting
prog.found() is false because it doesn't actually exist on disk, then
the user was probably trying to disable finding that program. But
find_program() currently doesn't distinguish between a machine file
lookup returning a not-found program, and returning a dummy program
because there's no entry at all.
Explicitly check for a dummy program, rather than checking if the
program was found, before deciding whether to discard the lookup results
and continue trying other program lookup methods.
|
|
When project is configured with -Dauto_features=disabled, meson
configure should not print "auto" value but "disabled" instead.
|
|
Before version 2.14.01, -MD required an output filename argument, with
`-MD outfile` equivalent to later versions' `-MD -MF outfile`. The older
syntax is still supported, and is still listed as the preferred syntax
in documentation.
Reference: https://github.com/netwide-assembler/nasm/commit/3475462e
Resolves: https://github.com/mesonbuild/meson/issues/11395
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
If an re call fails to find a match it returns None. We're not checking
that, and crashing.
Fixes: #11376
|
|
This is generally a good idea, and the tempfile is already instructed to
not auto-delete on close. It also fixes a bug on PyPy, where the file
isn't valid because it's not explicitly closed. This is probably due to
the garbage collection modes -- in CPython, the object goes out of scope
and gets automatically closed before we actually attempt to unpack it.
Fixes #11246
|
|
Silence a couple of framework tests that need to be skipped since we
don't install their dependencies for pypy3.
|
|
|
|
It's broken in e.g. pypy, but that's okay because the module is utterly
deprecated, and people should use the python module instead.
|
|
|
|
This solves rebuild issues when e.g. importing a .pxd header from a .pyx
file, just like C/C++ source headers. The transpiler needs to run again
in this case.
This functionality is present in the 3.0.0 alphas of cython, and is also
backported to 0.29.33.
Fixes #9049
|
|
We want to use as much default ninja behavior as we can, so reuse $out
instead of repeating the output file as a string in $ARGS, and raise
that into the build rule so it is only listed once.
|
|
headers
This was causing a ninja issue where the native headers were always
being generated because io.github.hse-project.hse_Hse.h was being
expected, but io.github.hse_project.hse_Hse.h was actually generated.
|
|
This could also be handled once, in the initializer
|
|
Now that we don't insert /utf-8 into the always args for MSVC < 19.00
we need to use a version > 19.00 for testing. This also means that
/Zc:__cplusplus will be added to the always args.
|
|
Instead of looking at it each time get_always_args() is called, do it
once. Also avoid mutating global state.
|
|
Eventually we would probably be better served (to avoid unnecessary
copies) to use the ImmutableListProtocol here, but for the moment this
is effective, it's also what we do in every other case.
|
|
Which are `Task`s, not `Future`s, and they return `None`, not `str`.
Spotted by newer versions of mypy
|
|
```
clang [...] -c valaprog.p/GLib.Thread.c
../test cases/vala/5 target glib/GLib.Thread.vala:17:17: error: incompatible integer to pointer conversion passing 'gint' (aka 'int') to parameter of type 'gpointer' (aka 'void *') [-Wint-conversion]
g_thread_exit (get_ret_code ());
^~~~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gthread.h:158:66: note: passing argument to parameter 'retval' here
void g_thread_exit (gpointer retval);
^
1 error generated.
```
|
|
We assume /utf-8 for all C builds unless /source-charset or
/execution-charset is specified, but then this will cause trouble for
Visual Studio 2013 or earler since the /utf-8 flag is only supported
since Visual Studio 2015. Specifically, if we try to check whether
compiler flags are supported, those checks will fail since /utf-8 is
never supported on these older Visual Studio versions.
Drop /utf-8 from get_always_args() if we are using Visual Studio 2013
or earlier.
|
|
the default parameter for python.install_sources is set to "runtime" but
should be "python-runtime" according to the existing documentation
- https://mesonbuild.com/Python-module.html#install_sources
- https://mesonbuild.com/Installing.html#installation-tags
|
|
We do += style joining in a loop, but we could just join with
`''.join()` which is faster, neater, and simpler.
|
|
Include a frivolous error message too. We never see it, but if someone
reads the code and wonders why on *earth* there's a DSL function to
raise a RuntimeError, the message string will clue them in.
|
|
Given the construct `foo = (bar == baz)` some people like parentheses
and some do not. They're pointless and don't mean anything, though. I
don't feel this is particularly helpful to code clarity, tbh, and pylint
now notices this and warns about it in our current pylint config.
I think this is reasonable, so let's remove the odd parens.
|
|
|
|
|
|
Union types that exist solely for use as annotations don't need to be
created in normal runs.
|
|
|
|
|
|
|
|
https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html#cuda-compilers
|
|
|
|
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.
|
|
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.
|
|
Because that is what the real interpreter does, too. It logs a failure
and carries on.
|
|
Ensuring the order is respected
|
|
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
|
|
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.
|
|
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
|
|
|
|
|