aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/environment.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/environment.py')
-rw-r--r--mesonbuild/environment.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
index fe89f0e..b184b3f 100644
--- a/mesonbuild/environment.py
+++ b/mesonbuild/environment.py
@@ -407,8 +407,7 @@ class Environment:
if isinstance(compiler, str):
compiler = [compiler]
try:
- basename = os.path.basename(compiler[-1]).lower()
- if basename == 'cl' or basename == 'cl.exe':
+ if 'cl' in compiler or 'cl.exe' in compiler:
arg = '/?'
else:
arg = '--version'
@@ -657,8 +656,7 @@ class Environment:
linker = [self.vs_static_linker]
else:
linker = [self.default_static_linker]
- basename = os.path.basename(linker[-1]).lower()
- if basename == 'lib' or basename == 'lib.exe':
+ if 'lib' in linker or 'lib.exe' in linker:
arg = '/?'
else:
arg = '--version'