Fix building static libs with the Xcode backend.
@@ -821,6 +821,7 @@ class XCodeBackend(backends.Backend):
ldargs += target.link_args
linker, stdlib_args = self.determine_linker_and_stdlib_args(target)
ldargs += self.build.get_project_link_args(linker, target.subproject, target.for_machine)
+ if not isinstance(target, build.StaticLibrary):
ldargs += self.build.get_global_link_args(linker, target.for_machine)
cargs = []
for dep in target.get_external_deps():
