diff options
author | Benjamin Redelings <benjamin.redelings@gmail.com> | 2018-01-22 22:21:40 -0500 |
---|---|---|
committer | Benjamin Redelings <benjamin.redelings@gmail.com> | 2018-01-22 22:31:05 -0500 |
commit | a8c051256f8b5514881df39c826e2327a9b52c7f (patch) | |
tree | a75f6bf2f5b7b9f8d14d5a96ed5c5b528310619c | |
parent | 9759294a7f81979ee1bf70d5311bbfa7cc77b7d9 (diff) | |
download | meson-a8c051256f8b5514881df39c826e2327a9b52c7f.zip meson-a8c051256f8b5514881df39c826e2327a9b52c7f.tar.gz meson-a8c051256f8b5514881df39c826e2327a9b52c7f.tar.bz2 |
Begin factoring abi_tag logic into own function.
-rw-r--r-- | mesonbuild/dependencies/misc.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/mesonbuild/dependencies/misc.py b/mesonbuild/dependencies/misc.py index 64b2072..18d8fc2 100644 --- a/mesonbuild/dependencies/misc.py +++ b/mesonbuild/dependencies/misc.py @@ -364,15 +364,19 @@ class BoostDependency(ExternalDependency): fname = os.path.basename(entry) self.lib_modules[self.modname_from_filename(fname)] = [fname] + def abi_tag(self): + if mesonlib.for_windows(self.want_cross, self.env): + return None + if self.is_multithreading and mesonlib.for_darwin(self.want_cross, self.env): + return '-mt' + else: + return '' + def detect_lib_modules_nix(self): all_found = True for module in self.requested_modules: - args = None - libname = 'boost_' + module - if self.is_multithreading and mesonlib.for_darwin(self.want_cross, self.env): - # - Linux leaves off -mt but libraries are multithreading-aware. - # - Mac requires -mt for multithreading, so should not fall back to non-mt libraries. - libname = libname + '-mt' + libname = 'boost_' + module + self.abi_tag() + args = self.compiler.find_library(libname, self.env, self.extra_lib_dirs()) if args is None: mlog.debug('Couldn\'t find library "{}" for boost module "{}"'.format(module, libname)) |