LLVM: use DragonFly BSD workaround on FreeBSD as well

pull/2803/head
Dylan Baker 7 years ago
parent 4cea88c2bb
commit 660dee1e10
  1. 14
      mesonbuild/dependencies/dev.py
  2. 3
      mesonbuild/mesonlib.py

@ -173,13 +173,13 @@ class LLVMDependency(ConfigToolDependency):
def _set_new_link_args(self): def _set_new_link_args(self):
"""How to set linker args for LLVM versions >= 3.9""" """How to set linker args for LLVM versions >= 3.9"""
if (mesonlib.is_dragonflybsd() and not self.static and if ((mesonlib.is_dragonflybsd() or mesonlib.is_freebsd()) and not
version_compare(self.version, '>= 4.0')): self.static and version_compare(self.version, '>= 4.0')):
# llvm-config on DragonFly BSD for versions 4.0, 5.0, and 6.0 have # llvm-config on DragonFly BSD and FreeBSD for versions 4.0, 5.0,
# an error when generating arguments for shared mode linking, even # and 6.0 have an error when generating arguments for shared mode
# though libLLVM.so is installed, because for some reason the tool # linking, even though libLLVM.so is installed, because for some
# expects to find a .so for each static library. This works around # reason the tool expects to find a .so for each static library.
# that. # This works around that.
self.link_args = self.get_config_value(['--ldflags'], 'link_args') self.link_args = self.get_config_value(['--ldflags'], 'link_args')
self.link_args.append('-lLLVM') self.link_args.append('-lLLVM')
return return

@ -288,6 +288,9 @@ def is_debianlike():
def is_dragonflybsd(): def is_dragonflybsd():
return platform.system().lower() == 'dragonfly' return platform.system().lower() == 'dragonfly'
def is_freebsd():
return platform.system().lower() == 'freebsd'
def for_windows(is_cross, env): def for_windows(is_cross, env):
""" """
Host machine is windows? Host machine is windows?

Loading…
Cancel
Save