aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/dependencies/boost.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/boost.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/boost.py')
-rw-r--r--mesonbuild/dependencies/boost.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/mesonbuild/dependencies/boost.py b/mesonbuild/dependencies/boost.py
index 62274b5..0ff49b1 100644
--- a/mesonbuild/dependencies/boost.py
+++ b/mesonbuild/dependencies/boost.py
@@ -185,7 +185,7 @@ class BoostDependency(ExternalDependency):
def detect_nix_roots(self):
return [os.path.abspath(os.path.join(x, '..'))
- for x in self.compiler.get_default_include_dirs()]
+ for x in self.clib_compiler.get_default_include_dirs()]
def detect_win_roots(self):
res = []
@@ -243,8 +243,8 @@ class BoostDependency(ExternalDependency):
# and http://stackoverflow.com/questions/37218953/isystem-on-a-system-include-directory-causes-errors
# for more details
- if include_dir and include_dir not in self.compiler.get_default_include_dirs():
- args.append("".join(self.compiler.get_include_args(include_dir, True)))
+ if include_dir and include_dir not in self.clib_compiler.get_default_include_dirs():
+ args.append("".join(self.clib_compiler.get_include_args(include_dir, True)))
return args
def get_requested(self, kwargs):
@@ -256,7 +256,7 @@ class BoostDependency(ExternalDependency):
def detect_headers_and_version(self):
try:
- version = self.compiler.get_define('BOOST_LIB_VERSION', '#include <boost/version.hpp>', self.env, self.get_compile_args(), [])
+ version = self.clib_compiler.get_define('BOOST_LIB_VERSION', '#include <boost/version.hpp>', self.env, self.get_compile_args(), [])
except mesonlib.EnvironmentException:
return
except TypeError:
@@ -361,7 +361,7 @@ class BoostDependency(ExternalDependency):
for module in self.requested_modules:
libname = 'boost_' + module + tag
- args = self.compiler.find_library(libname, self.env, self.extra_lib_dirs())
+ args = self.clib_compiler.find_library(libname, self.env, self.extra_lib_dirs())
if args is None:
mlog.debug("Couldn\'t find library '{}' for boost module '{}' (ABI tag = '{}')".format(libname, module, tag))
all_found = False
@@ -476,7 +476,7 @@ class BoostDependency(ExternalDependency):
def get_link_args(self):
args = []
for dir in self.extra_lib_dirs():
- args += self.compiler.get_linker_search_args(dir)
+ args += self.clib_compiler.get_linker_search_args(dir)
for lib in self.requested_modules:
args += self.lib_modules['boost_' + lib]
return args