Age | Commit message (Collapse) | Author | Files | Lines |
|
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
|
|
|
|
The latter is a python built-in exception, the former is a meson
exception.
|
|
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
|
|
Currently we don't handle things correctly if we get a string we should
split, and the linker and needs compiler arguments. It would result in
two unsplit strings in a list, instead of the split arguments in a list
Fixes: #8348
|
|
Clang has a hand `-Wunused-command-line-argument` switch, which when
turned to an error, gets very grump about `-flto-jobs=0` being set in
the compiler arguments (although `-flto=` belongs there). We'll refactor
a bit to put that only in the link arguments.
GCC doesn't have this probably because, a) it doesn't have an equivalent
warning, and b) it uses `-flto=<$numthreads.
Fixes: #8347
|
|
|
|
|
|
This uses a separate option, b_lto_mode. It works in conjunction with
b_lto_threads.
Fixes #7493
|
|
Both Clang and GCC support using multiple threads for preforming link
time optimizaions, and they can now be configured using the
`-Db_lto_threads` option.
Fixes #7820
|
|
Signed-off-by: Antonin Décimo <antonin.decimo@gmail.com>
|
|
This has a bunch of nice features. It obviously centralizes everything,
which is nice. It also means that env is only re-read at `meson --wipe`,
not `meson --reconfigure`. And it's going to allow more cleanups.
|
|
|
|
This is PEP8 convention for a const variable. Also, make the type
Mapping, which doesn't have mutation methods. This means mypy will warn
us if someone tries to change this.
|
|
I would have prefered to do these seperatately, but they are combined in
some cases, so it was much easier to convert them together.
this eliminates the builtins_per_machine dict, as it's duplicated with
the OptionKey's machine parameter.
|
|
There's starting to be a lot of things including coredata that coredata
needs to itself include. putting it in mesonlib makes more sense
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Adds TemporaryDirectoryWinProof which calls windows_proof_rmtree() on
error.
Use instead of hacky error handling (which might shadow other OSError)
in Compiler.compile().
|
|
This reverts commit 3e6fbde94c1cb8d4e01b7daf0282c315ff0e6c7d.
|
|
When TemporaryDirectory() cleans up on __exit__ it sometimes throws
OSError noting that the dir isn't empty. This happens after the
first yield in this generator and leads to the exception being handled
which leads to a second yield.
contextlib.contextmanager() fails then since the function it wraps is only
allowed to yield once.
Fix this by not yielding again in the error case.
Fixes #7947
|
|
|
|
It is much easier to not try to parse options into complicated
structures until we actually collected all options: machine files,
command line, project()'s default_options, environment.
|
|
|
|
|
|
|
|
|
|
This abstraction is really useful, and most compilers could use it
(including D). It also will allow the Gnu mixins to work properly
without the CLikeCompiler in their mro.
|
|
This is groundwork to put _build_wrapper in the base Compiler, which is
needed to make the D compilers truly type safe.
|
|
|
|
|
|
|
|
|
|
|
|
So that every subclass doesn't have to reimplement it. Especially since
the Gnu implementation moved out of the CCompiler and into the
GnuLikeCompiler mixin
|
|
Only the GnuLikeCompiler overrides this, and it's implemented multiple
places
|
|
|
|
|
|
We do this by making the mixins inherit the Compiler class only when
mypy is examining the code (using some clever inheritance shenanigans).
This caught a bunch of issues, and also lets us delete a ton of code.
|
|
Every class needs to set this, so it should be part of the base. For
classes that require is_cross, the positional argument remains in their
signature. For those that don't, they just allow the base class to set
their value to it's default of False.
|
|
Every language had the exact same implementation
|
|
Instead of putting that extra argument in the base compiles() class
|