aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/dependencies/mpi.py
diff options
context:
space:
mode:
authorSmallWood-D <shay.gozan@gmail.com>2022-09-25 21:30:03 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2022-11-29 01:48:27 +0200
commitd32ee583ada8304fb31d11382bc6055f6239a99b (patch)
tree02b30d6a37cfc2e2c9b0aa9f0db0e3e7bf4a3f1a /mesonbuild/dependencies/mpi.py
parent23fcea16e56cd154f995208a0443e3d8c18bd8bf (diff)
downloadmeson-d32ee583ada8304fb31d11382bc6055f6239a99b.zip
meson-d32ee583ada8304fb31d11382bc6055f6239a99b.tar.gz
meson-d32ee583ada8304fb31d11382bc6055f6239a99b.tar.bz2
Fix crash when toolchain is missing
Add a MissingCompiler class returned by compiler detecting methods intead of None - accessing such an object raises a DependencyException Fixes #10586 Co-authored-by: duckflyer <duckflyer@gmail.com>
Diffstat (limited to 'mesonbuild/dependencies/mpi.py')
-rw-r--r--mesonbuild/dependencies/mpi.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/dependencies/mpi.py b/mesonbuild/dependencies/mpi.py
index 2354767..a99a4cc 100644
--- a/mesonbuild/dependencies/mpi.py
+++ b/mesonbuild/dependencies/mpi.py
@@ -40,7 +40,7 @@ def mpi_factory(env: 'Environment',
candidates: T.List['DependencyGenerator'] = []
compiler = detect_compiler('mpi', env, for_machine, language)
- if compiler is None:
+ if not compiler:
return []
compiler_is_intel = compiler.get_id() in {'intel', 'intel-cl'}