Xcode: do not reuse objs in both_libraries because Xcode fails on targets with no sources.

pull/8690/head
Jussi Pakkanen 4 years ago
parent 10197aa9d1
commit e80a13af73
  1. 13
      mesonbuild/interpreter/interpreter.py

@ -2732,7 +2732,18 @@ Try setting b_lundef to false instead.'''.format(self.coredata.options[OptionKey
elif key in self.environment.coredata.options:
pic = self.environment.coredata.options[key].value
if pic:
if self.backend.name == 'xcode':
# Xcode is a bit special in that you can't (at least for the moment)
# form a library only from object file inputs. The simple but inefficient
# solution is to use the sources directly. This will lead to them being
# built twice. This is unfortunate and slow, but at least it works.
# Feel free to submit patches to get this fixed if it is an
# issue for you.
reuse_object_files = False
else:
reuse_object_files = pic
if reuse_object_files:
# Exclude sources from args and kwargs to avoid building them twice
static_args = [args[0]]
static_kwargs = kwargs.copy()

Loading…
Cancel
Save