xcode: Override determine_swift_deps_dir()

Xcode does not recognize our private directories, nor does it ever
try to generate them. Instead, just import the build directories
for each swift dependency.

This fixes linking between swift targets when they are in their own
subdirectories, as they will have different build directories in that
case.
pull/12618/head
Albert Tang 1 year ago committed by Eli Schwartz
parent 354843c428
commit 2915ab31af
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6
  1. 7
      mesonbuild/backend/xcodebackend.py

@ -255,6 +255,13 @@ class XCodeBackend(backends.Backend):
obj_path = f'{project}.build/{buildtype}/{tname}.build/Objects-normal/{arch}/{stem}.o'
return obj_path
def determine_swift_dep_dirs(self, target):
result: T.List[str] = []
for l in target.link_targets:
# Xcode does not recognize our private directories, so we have to use its build directories instead.
result.append(os.path.join(self.environment.get_build_dir(), self.get_target_dir(l)))
return result
def generate(self, capture: bool = False, vslite_ctx: dict = None) -> T.Optional[dict]:
# Check for (currently) unexpected capture arg use cases -
if capture:

Loading…
Cancel
Save