diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2024-11-17 08:40:22 +0100 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2024-12-19 09:25:20 -0800 |
| commit | 1f1a6d3a45ab968bbc28854c4733dc1303abb176 (patch) | |
| tree | c83237c34f1984f248671896162875e48a91573a /mesonbuild/compilers | |
| parent | 5768ccba6eb77167da96712c20a4e042efb31d03 (diff) | |
| download | meson-1f1a6d3a45ab968bbc28854c4733dc1303abb176.tar.gz | |
rust: raise a warning if clippy is used instead of rustc
clippy-driver is not meant to be a general-purpose compiler front-end.
Since Meson can now provide natively the ability to invoke clippy,
raise a warning if someone uses it that way.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'mesonbuild/compilers')
| -rw-r--r-- | mesonbuild/compilers/detect.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mesonbuild/compilers/detect.py b/mesonbuild/compilers/detect.py index 7542fb628..d88441dff 100644 --- a/mesonbuild/compilers/detect.py +++ b/mesonbuild/compilers/detect.py @@ -1042,6 +1042,10 @@ def detect_rust_compiler(env: 'Environment', for_machine: MachineChoice) -> Rust version = search_version(out) cls = rust.ClippyRustCompiler + mlog.deprecation( + 'clippy-driver is not intended as a general purpose compiler. ' + 'You can use "ninja clippy" in order to run clippy on a ' + 'meson project.') if 'rustc' in out: # On Linux and mac rustc will invoke gcc (clang for mac |
