Age | Commit message (Collapse) | Author | Files | Lines |
|
Union types that exist solely for use as annotations don't need to be
created in normal runs.
|
|
|
|
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
|
|
|
|
It is only used by Environment.get_exe_wrapper() and every callers were
handling None already. Type annotation was wrong, it already could
return None for the case an exe wrapper is needed but none is provided.
|
|
Which adds the `use-set-for-membership` check. It's generally faster in
python to use a set with the `in` keyword, because it's a hash check
instead of a linear walk, this is especially true with strings, where
it's actually O(n^2), one loop over the container, and an inner loop of
the strings (as string comparison works by checking that `a[n] == b[n]`,
in a loop).
Also, I'm tired of complaining about this in reviews, let the tools do
it for me :)
|
|
Found with codespell.
|
|
Move `detect_native_windows_arch()` to `mesonlib/universal.py` and
rename it to `windows_detect_native_arch()`
Use `IsWow64Process2()` to detect native architecture if available
Use native `vcvarsarm64.bat` to initialize vsenv if available
|
|
|
|
In various situations we want to figure out what type of compiler we
have, because we want to know stuff like "is it the pgi one", or "does
it use msvc style". The compiler object has this property already, via
an API specifically designed to communicate this info, but instead we
performed isinstance checks on a compiler class.
This is confusing and indirect, and has the side effect of requiring
more imports everywhere. We should do away with it.
|
|
15 is the current snapshot version, 13 and 14 are released.
|
|
The new get_env() method that returns an EnvironmentVariables object
will be needed in next commit that will pass it to CustomTarget.
This has the side effect to use the proper os specific path separator
instead of hardcoding `:`. It is the obvious right thing to do here, but
has caused issues in the past. Hopefully issues have been fixed in the
meantime. If not, better deal with fallouts than keep doing the wrong
thing forever.
|
|
A bunch of files have several T.TYPE_CHECKING blocks that each do some
things which could just as well be done once, with a single `if`
statement. Make them do so.
|
|
The previous install dir seemed incorrect when looking at various Linux
distributions.
|
|
We say:
> If version 4.2 or higher of the first is found, targets coverage-text,
> coverage-xml, coverage-sonarqube and coverage-html are generated.
But this is totally untrue. Make it true, by actually checking (and
not generating broken coverage commands when older versions of gcovr are
found).
Fixes #9505
|
|
|
|
discovered via flake8 --select E303
|
|
I ran into one of these from LGTM, and it would be nice if pylint could
warn me as part of my local development process instead of waiting for
the CI to tell me.
|
|
Fixes #9191
|
|
This seems like an oversight, that we'd replace ppc with ppc64 on AIX
for the cpu_family, but not for the specific cpu.
|
|
These are just annotations in code that I'm working for this series
|
|
|
|
It is theoretically possible for the command to be None so we should
handle that.
|
|
|
|
|
|
|
|
This moves all the compiler detection logic into the new
compilers.detect module. This dramatically reduces the size
and complexity of Environment.
|
|
Both LLVM 11 and 12 are stable releases. Note that FreeBSD changes the
way to version LLVM executables in LLVM 10.
|
|
|
|
|
|
The JDK system dependency is important for detecting JDK include paths
that may be useful when developing a JNI interface.
|
|
Instead of treating native files as always being for the build machine,
and then copying them to the host machine, treat them as for the build
machine only when a cross file is also present
|
|
|
|
|
|
|
|
Fixes #8605
|
|
They are supposed to have different behavior. The environment variables
apply to both the compiler and linker when the compiler acts as a
linker, but the command line ones do not.
Fixes #8345
|
|
Dependencies is already a large and complicated package without adding
programs to the list. This also allows us to untangle a bit of spaghetti
that we have.
|
|
This also makes us of the new enum value in the backend, for better type
saftey.
|
|
The script dir is never really used since meson --internal handles this.
The last remaining use of the raw script dir got removed in commit
522392e7553823e6b3ac38cadc4fbee72eae9540.
|
|
performed by running "pyupgrade --py36-plus" and committing the results
|
|
All changes were created by running
"pyupgrade --py3-only --keep-percent-format"
and committing the results. I have not touched string formatting for
now.
- use set literals
- simplify .format() parameter naming
- remove __future__
- remove default "r" mode for open()
- use OSError rather than compatibility aliases
- remove stray parentheses in function(generator) scopes
|
|
This did work previously, so we need to let it continue working. I'm
proposing removing it in 0.60 because the correct solution has always
worked.
I've also been a bit more defensive here, and made setting
`subproject:opt = foo` in the machine files an error, as we have
`[subproject:built-in options]` or `[subproject:project options]` for
that.
|
|
Or other language flags that use CPPFLAGS (like CXXFLAGS). The problem
here is actually rather simple, `dict.setdefault()` doesn't work like I
thought it did, I thought it created a weak entry, but it actually is
equivalent to:
```python
if k not in dict:
dict[k] = v
```
Instead we'll use an intermediate dictionary (a default dictionary
actually, since that makes things a little cleaner) and then add the
keys from that dict to self.options as applicable.
Test case written by Jussi, Fix by Dylan
Co-authored-by: Jussi Pakkanen
Fixes: #8361
Fixes: #8345
|
|
Fixed typos and reworded some sentences.
Signed-off-by: Ali Alnubani <alialnu@nvidia.com>
|
|
Currently mesonlib does some import tricks to figure out whether it
needs to use windows or posix specific functions. This is a little
hacky, but works fine. However, the way the typing stubs are implemented
for the msvcrt and fnctl modules will cause mypy to fail on the other
platform, since the functions are not implemented.
To aleviate this (and for slightly cleaner design), I've split mesonlib
into a pacakge with three modules. A universal module contains all of
the platform agnositc code, a win32 module contains window specific
code, a posix module contains the posix specific code, and a platform
module contains no-op implementations. Then the package's __init__ file
imports all of the universal functions and all of the functions from the
approriate platform module, or the no-op versions as fallbacks. This
makes mypy happy, and avoids `if`ing all over the code to switch between
the platform specific code.
|
|
they're really not public methods, they'r only meant to be called from
the initializer. Let's mark them as such.
|
|
This function returns both the name and the value, but we never actually
use the name, just the value. Also make this module private. We really
want to keep all environment variable reading in the Environment class
so it's done once up front. This should help with that goal.
|
|
This is only used in environment, so it should live there too.
|
|
This both moves the env reading to configuration time, which is useful,
and also simplifies the implementation of the boost dependency. The
simplification comes from being able to delete basically duplicated code
since the values will be in the Properties if they exist at all.
|