aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/dependencies/misc.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2018-06-19 09:31:32 +0530
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2018-06-20 11:27:08 +0000
commitd73748815014b8b4bbbd7fe7fb8b50b8a75aecfc (patch)
treedc535b92cd6f496fbc6cb4153fad7449f286d45a /mesonbuild/dependencies/misc.py
parentebda6ef9c801278bd15a6499c80fff26071feded (diff)
downloadmeson-d73748815014b8b4bbbd7fe7fb8b50b8a75aecfc.zip
meson-d73748815014b8b4bbbd7fe7fb8b50b8a75aecfc.tar.gz
meson-d73748815014b8b4bbbd7fe7fb8b50b8a75aecfc.tar.bz2
dependencies: Don't assume self.compiler is a C compiler
All dependencies were using find_library, has_header, get_define, etc on self.compiler assuming that it's a compiler that outputs and consumes C-like libraries. This is not true for D (and in the future, for Rust) since although they can consume C libraries, they do not use the C ecosystem. For such purposes, we now have self.clib_compiler. Nothing uses self.compiler anymore as a result, and it has been removed.
Diffstat (limited to 'mesonbuild/dependencies/misc.py')
-rw-r--r--mesonbuild/dependencies/misc.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/dependencies/misc.py b/mesonbuild/dependencies/misc.py
index 37195cc..9d8691c 100644
--- a/mesonbuild/dependencies/misc.py
+++ b/mesonbuild/dependencies/misc.py
@@ -258,7 +258,7 @@ class OpenMPDependency(ExternalDependency):
super().__init__('openmp', environment, language, kwargs)
self.is_found = False
try:
- openmp_date = self.compiler.get_define('_OPENMP', '', self.env, [], [self])
+ openmp_date = self.clib_compiler.get_define('_OPENMP', '', self.env, [], [self])
except mesonlib.EnvironmentException as e:
mlog.debug('OpenMP support not available in the compiler')
mlog.debug(e)
@@ -266,7 +266,7 @@ class OpenMPDependency(ExternalDependency):
if openmp_date:
self.version = self.VERSIONS[openmp_date]
- if self.compiler.has_header('omp.h', '', self.env, dependencies=[self]):
+ if self.clib_compiler.has_header('omp.h', '', self.env, dependencies=[self]):
self.is_found = True
else:
mlog.log(mlog.yellow('WARNING:'), 'OpenMP found but omp.h missing.')