Cython historically, when asked to print the version and exit
successfully, would do so on stderr, which is weird and inconsistent.
Recently, it fixed this UX bug by printing on stdout instead:
https://github.com/cython/cython/issues/5504
This then broke meson detection because we assumed it was on stderr due
to historically being there:
https://github.com/scipy/scipy/issues/18865
Cython is right, and shouldn't have to revert this reasonable change for
backwards compatibility. Instead, check both.
There are some new(er) methods that have not version reference, so add
the missing ones in order to be properly notified when targetting older
meson versions.
Co-authored-by: Tristan Partin <tristan@partin.io>
Instead of hardcoding any values, hardcode what we think the most likely
implementation is, and check that first. It was pointed out that while
for example, Apple only provides libc++ and supports that for xcode, a
user could install a custom environment (such as homebrew) which uses
it's own copy of libstdc++, and we need to account for that. This means
that a library search will be done, but only once and the result will be
cached, on all systems.
It is not the primary purpose of mtest, and it ends up mingled with a
list of actual tests, which isn't nice if you're trying to capture and
parse this.
In commit 628effb369 we started verifying
the build.ninja file was up to date before even `--list`ing tests,
because we could end up with incorrect information. This meant that
ninja always runs at startup, and typically returns "no work to do",
which ended up listed as "one of" the tests.
Instead of unconditionally running ninja attached to the console, first
check it in dry-run mode with stdout intercepted, to see if ninja
considers itself up to date. If it is, continue. Only if an actual
refresh is needed, do we run it while attached to the console.
In the garden path, this avoids useless information. In cases where we'd
already print a full meson reconfigure log, we continue to do so.
By default, clang-cl based environments use rc.exe as resource
compiler. However, when cross compiling with clang-cl, one might
want to use llvm-rc instead.
Try to detect llvm-rc based on the output from "$CMD /?".
This requires a very recent llvm-rc; previosly, the output of
"/?" with llvm-rc was very generic and didn't explicitly indicate
that it actually was llvm-rc. This was changed in
bab6902eba
which will be included in the upcoming LLVM 17.0.0 release.
Contrary to the other regexes, don't include the preceding parts
of the line in the log printout, as it includes an unhelpful
"OVERVIEW:" prefix.
This fixes regression caused by
3162b901ca
that changes the order in which libraries are put on the link command.
In addition, that commit was wrong because libraries from dependencies
were processed before process_compiler() is called, which that commit
wanted to avoid.
When downloading wrap content, we need to know at some point if the
server is going to respond with "hello, yes, I'm here and I have data
for you". The alternative is to sometimes infinitely hang.
In commit 8f7781f1d6 we added such a
timeout, but using an extremely generously high number -- ten minutes.
We don't need to wait this long just to find out if the other end
exists, so decrease that time to 30 seconds, whch is still ludicrously
generous but not quite as much so.
This reverts commit 904b47085f.
This is not a real bottleneck, and we want to create it thrice -- once
before the backend is generated. The final install data needs to be
created fresh.
Update unittest to demonstrate the issue.
Fixes https://bugs.gentoo.org/910050
This has issues on Windows with msys2/cygwin, where we need to build it
ourselves since binary wheels aren't supported on PyPI. And we don't
have a rust compiler available for either one -- we may not be *able* to
do so for cygwin?
For msys2, the solution is pretty easy, just rely on the official msys2
packages for jsonschema, which handle both it and its dependencies for
us and don't require us to compile anything. Currently they still have
an older jsonschema that doesn't use rust deps at all, but that's
because the new jsonschema was released today. We'll automatically catch
up at some point.
For cygwin, there is no rust compiler in the cygwin repository, and
jsonschema there is old as the hills. I do not know if there's a good
answer here, but an adequate answer is to cap jsonschema at the version
we were testing with yesterday.
We need a union of the compilers used by the target, and by those used
by all dependencies, not all the compilers in all projects. We do,
however, need to look compilers up from all possible compilers, as a
dependency that is a subproject could use a language not present in the
current project.
Fixes get_define() for MSVC. cl with /std:c11 and newer add a trailing
space character when substituting, even if macro is empty. This breaks
parsing preprocessed output to extract value. Since they cannot contain
spaces it is safe to simply strip parsed value.
Fixes: #10179
While both kernels are derived from the OpenSolaris project of Sun, they
have diverged and code that works with one may not work with the other.
As such, we should provide different values for them. This was requested
by both Oracle and the illumos upstreams.
Fixes: #11922
After the recent change to the backend `generate(...)` signature for
'--genvslite', `profile.runctx('...')` needs to construct the correct
cmd string and also extract the return result from `locals()`.
By avoiding Java-style variable naming, the code becomes considerably
more readable while simultaneously becoming *more* easy to understand.
It's no longer necessary to ask questions like "what's a captured
buildtype" when trying to read through the code for a backend, because
it can be dismissed as not relevant to the current context by re-reading
it as "context for vslite".
The primary goal here has been to revert regressions in the developer
experience for users of the ninja backend, so there may still be issues
in vs2010backend.py
Post-facto application of issues that were raised during review,
ignored, and merged despite such.
Function comments that overflow the screen width by coming after code,
instead of on their own line, are hard to read. Same applies to message
strings that are all on one line. Fix by reflowing them.
Post-facto application of issues that were caught during post-merge
review, after the genvslite PR was merged without a full review.
The option description has a lot of data packed into it, which is
squeezed into a small, hard to read column. Give a bit less information,
focusing on essentials, to make it fit better.
Post-facto application of issues that were caught during post-merge
review, after the genvslite PR was merged without a full review.
Currently, we hardcode libc++ for MacOS (and derivatives), and libstdc++
for all other cases. Clang had some hackery to make this work in many
cases. However, this doesn't always work, namely if you try to to use
Rust as the linker when libc++ is required.
This implementation does, as an optimization, provide a hardcoded list
of OSes we know always use libc++, and otherwise will attempt to detect
it. As a second optimization, the detected values are cached, so the
lookup is only done once
fixes: #11921