aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/rust.py
AgeCommit message (Collapse)AuthorFilesLines
2022-03-22OptionOverrideProxy: Make it immutable to avoid copiesXavier Claessens1-2/+2
It is always used as an immutable view so there is no point in doing copies. However, mypy insist it must implement the same APIs as Dict[OptionKey, UserOption[Any]] so keep faking it.
2022-01-10compilers: push the compiler id to a class variableDylan Baker1-9/+2
It really is a per class value, and shouldn't be set per instance. It also allows us to get rid of useless constructors, including those breaking mypy
2021-10-21compilers/rust: fix typo in standard descriptionDylan Baker1-1/+1
2021-10-21compilers/rust: add support for the 2021 editionDylan Baker1-1/+1
2021-09-24compilers/rust: Add support for clippyDylan Baker1-0/+17
Clippy is a compiler wrapper for rust that provides an extra layer of linting. It's quite popular, but unfortunately doesn't provide the output of the compiler that it's wrapping in it's output, so we don't detect that clippy is rustc. This small patch adds a new compiler class (that is the Rustc class with a different id) and the necessary logic to detect that clippy is in fact rustc) Fixes: #8767
2021-09-24rustc: implement pic argsDylan Baker1-0/+9
2021-09-24compilers/rust: Implement warning levelsDylan Baker1-0/+14
Currently this implements 3 warning levels, 1 and 2 are just the "default" set by rustc, 3, is "everything is a warning", and 0 is "nothign is a warning".
2021-09-24rust: Add werror argumentsDylan Baker1-0/+5
2021-06-29fix: Always explicitly set encoding for text files (fixes #8263)Daniel Mensinger1-1/+1
2021-05-19rust: override get_linker_always_argsDylan Baker1-0/+6
instead of opencoding what should be there in the rust compile rule
2021-03-19split program related classes and functions out of dependenciesDylan Baker1-1/+1
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.
2021-03-04mass rewrite of string formatting to use f-strings everywhereEli Schwartz1-3/+3
performed by running "pyupgrade --py36-plus" and committing the results
2021-01-04use OptionKey for builtin and base optionsDylan Baker1-2/+2
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.
2021-01-04move OptionKey to mesonlibDylan Baker1-2/+4
There's starting to be a lot of things including coredata that coredata needs to itself include. putting it in mesonlib makes more sense
2021-01-04use OptionKey for compiler_optionsDylan Baker1-5/+8
2020-11-13compilers/rust: add and use an implementation of use_linker_argsDylan Baker1-0/+4
2020-11-10compilers/rust: Add color outputDylan Baker1-1/+7
Rust has color output, although it's help doesn't document it. It uses the same values as cargo (and everything else), auto, never, always.
2020-11-10compilers/rust: Add vs_crt supportDylan Baker1-0/+6
As far as I can Tell, rust just handles this for us (it's always worked with no special arguments from us). However, since we're going to add support for base options for rust, we need to add the method.
2020-11-05rust: implement support for --editionDylan Baker1-0/+19
Using the std option, so now `rust_std=..` will work. I've chosen to use "std" even though rust calls these "editions", as meson refers to language versions as "standards", which makes meson feel more uniform, and be less surprising. Fixes: #5100
2020-10-01compilers/rust: add type annotationsDylan Baker1-25/+38
2020-10-01compilers/cuda: make type safeDylan Baker1-3/+0
2020-09-24compilers: make is_cross part of the base Compiler classDylan Baker1-3/+2
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.
2020-09-24compilers: put name_string method in base compilerDylan Baker1-3/+0
Every language had the exact same implementation
2020-09-24compilers/compilers: Fully type annotateDylan Baker1-0/+3
2020-01-08types: import typing as T (fixes #6333)Daniel Mensinger1-2/+2
2019-12-12compilers: move language attribute to the class levelDylan Baker1-1/+1
We know that if a compiler class inherits CCompiler it's language will be C, so doing this at the class level makes more sense.
2019-12-02Allow selecting the dynamic linkerDylan Baker1-1/+5
This uses the normal meson mechanisms, an LD environment variable or via cross/native files. Fixes: #6057
2019-10-07compilers: replace CompilerType with MachineInfoDylan Baker1-2/+7
Now that the linkers are split out of the compilers this enum is only used to know what platform we're compiling for. Which is what the MachineInfo class is for
2019-08-20Merge pull request #5681 from dcbaker/dynamic-linker-splitJussi Pakkanen1-9/+6
split dynamic linker representations from compilers
2019-08-17Pass optimization flags to rustc properly. Closes: #5788.Jussi Pakkanen1-5/+5
2019-08-14compilers: Dispatch to dynamic linker classDylan Baker1-7/+4
Most of the cuda code is from Olexa Bilaniuk. Most of the PGI code is from Michael Hirsc
2019-08-14compilers/rust: Proxy extra kwargs to Compiler.__init__Dylan Baker1-2/+2
2019-06-22Increase logging for Rust CI failures.Jussi Pakkanen1-3/+11
2019-06-09Purge `is_cross` and friends without changing user interfacesJohn Ericson1-4/+4
In most cases instead pass `for_machine`, the name of the relevant machines (what compilers target, what targets run on, etc). This allows us to use the cross code path in the native case, deduplicating the code. As one can see, environment got bigger as more information is kept structured there, while ninjabackend got a smaller. Overall a few amount of lines were added, but the hope is what's added is a lot simpler than what's removed.
2019-03-24Fix setup so test suite runs with rustc + MSVC. Closes: 5099Jussi Pakkanen1-0/+6
2019-01-06Added more compiler option supportDaniel Mensinger1-0/+8
2019-01-06Absolute path generation refactoringDaniel Mensinger1-0/+3
2018-08-18Convert buildtype to optimization and debug options (#3489)Jussi Pakkanen1-1/+15
2018-01-29Add cross-compilation support for `rustc`Adam C. Foltzer1-2/+13
This patch is largely modeled on the relatively-straightforward code for Fortran cross-compilation, so there might be some intricacies missing.
2017-07-21Add build_rpath as new property allowing people to specify rpath entries ↵Jussi Pakkanen1-2/+2
that are used in the build tree but will be removed on install.
2017-06-23Split out languages from compilers.pyAlistair Thomas1-0/+59