aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/dependencies
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2018-09-28 09:24:25 -0700
committerDylan Baker <dylan@pnwbakers.com>2018-10-01 14:23:34 -0700
commite5080a8453d7eea2a91ffb53bdb652336c260834 (patch)
treedb2746e576a0057b0ca5c38a4a79d6e38940793c /mesonbuild/dependencies
parent177fa050b198f95b004d60fed3e3008123905871 (diff)
downloadmeson-e5080a8453d7eea2a91ffb53bdb652336c260834.zip
meson-e5080a8453d7eea2a91ffb53bdb652336c260834.tar.gz
meson-e5080a8453d7eea2a91ffb53bdb652336c260834.tar.bz2
dependencies/llvm: Fix shared linking on osx
The versions of LLVM provided by brew have the same configuration problem that dragonflyBSD and FreeBSD do, which means that they produce wrong results for shared linking.
Diffstat (limited to 'mesonbuild/dependencies')
-rw-r--r--mesonbuild/dependencies/dev.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/mesonbuild/dependencies/dev.py b/mesonbuild/dependencies/dev.py
index d8289c5..f20b9e0 100644
--- a/mesonbuild/dependencies/dev.py
+++ b/mesonbuild/dependencies/dev.py
@@ -260,13 +260,15 @@ class LLVMDependency(ConfigToolDependency):
def _set_new_link_args(self):
"""How to set linker args for LLVM versions >= 3.9"""
- if ((mesonlib.is_dragonflybsd() or mesonlib.is_freebsd()) and not
- self.static and version_compare(self.version, '>= 4.0')):
+ if (not self.static and (mesonlib.is_osx() or
+ ((mesonlib.is_dragonflybsd() or mesonlib.is_freebsd()) and
+ version_compare(self.version, '>= 4.0')))):
# llvm-config on DragonFly BSD and FreeBSD for versions 4.0, 5.0,
# and 6.0 have an error when generating arguments for shared mode
- # linking, even though libLLVM.so is installed, because for some
- # reason the tool expects to find a .so for each static library.
- # This works around that.
+ # linking, even though libLLVM.so is installed, because llvm-config
+ # is misconfigured at build time.
+ # MacOS from brew has the same problem, except that it applies to
+ # all versions (3.9 - 7.0)
self.link_args = self.get_config_value(['--ldflags'], 'link_args')
self.link_args.append('-lLLVM')
return