Don't use -Wl,-no_weak_imports when checking function existence. This patch should only be applied on Snow Leopard and earlier because the version of ld64 that MacPorts uses by default on Snow Leopard and earlier doesn't understand that option. Temporary workaround for https://github.com/mesonbuild/meson/issues/7204 --- mesonbuild/compilers/mixins/clang.py.orig 2020-04-26 04:07:10.000000000 -0500 +++ mesonbuild/compilers/mixins/clang.py 2020-05-28 08:15:20.000000000 -0500 @@ -81,13 +81,6 @@ dependencies: T.Optional[T.List['Dependency']] = None) -> bool: if extra_args is None: extra_args = [] - # Starting with XCode 8, we need to pass this to force linker - # visibility to obey OS X/iOS/tvOS minimum version targets with - # -mmacosx-version-min, -miphoneos-version-min, -mtvos-version-min etc. - # https://github.com/Homebrew/homebrew-core/issues/3727 - # TODO: this really should be communicated by the linker - if isinstance(self.linker, AppleDynamicLinker) and mesonlib.version_compare(self.version, '>=8.0'): - extra_args.append('-Wl,-no_weak_imports') return super().has_function(funcname, prefix, env, extra_args=extra_args, dependencies=dependencies)