aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilipe Laíns <lains@riseup.net>2023-09-01 02:08:53 +0100
committerEli Schwartz <eschwartz93@gmail.com>2023-09-01 02:09:21 -0400
commit025bcc0d9d1f7ebdc3ba483ef77bc515327364bf (patch)
tree528d9553f6fc52d066f4f6d8bac045e68f11ab19
parentcf5adf0c646474f0259d123fad60ca5ed38ec891 (diff)
downloadmeson-025bcc0d9d1f7ebdc3ba483ef77bc515327364bf.zip
meson-025bcc0d9d1f7ebdc3ba483ef77bc515327364bf.tar.gz
meson-025bcc0d9d1f7ebdc3ba483ef77bc515327364bf.tar.bz2
compilers: fix compiler detection when the "ccache" string is in the path
Signed-off-by: Filipe Laíns <lains@riseup.net>
-rw-r--r--mesonbuild/compilers/detect.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/compilers/detect.py b/mesonbuild/compilers/detect.py
index f997247..0bfedd1 100644
--- a/mesonbuild/compilers/detect.py
+++ b/mesonbuild/compilers/detect.py
@@ -1034,7 +1034,7 @@ def detect_rust_compiler(env: 'Environment', for_machine: MachineChoice) -> Rust
extra_args['machine'] = cc.linker.machine
else:
exelist = cc.linker.exelist + cc.linker.get_always_args()
- if 'ccache' in exelist[0]:
+ if os.path.basename(exelist[0]) in {'ccache', 'sccache'}:
del exelist[0]
c = exelist.pop(0)
compiler.extend(cls.use_linker_args(c, ''))