From 0fade02fe26d89d54cccc711b4d8a29143ebea8a Mon Sep 17 00:00:00 2001 From: Cepsylon Date: Thu, 27 Jun 2024 20:47:25 +0200 Subject: backend: xcode fix map access in generate_pbx_sources_build_phase for CustomTargetIndex Fix incorrect map access to custom_target_output_buildfile in CustomTargetIndex case. Map keys are file names with the path appended, but the used keys were just the file name. This led to crashes. --- mesonbuild/backend/xcodebackend.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mesonbuild/backend/xcodebackend.py') diff --git a/mesonbuild/backend/xcodebackend.py b/mesonbuild/backend/xcodebackend.py index 69a544b24..344ac1f82 100644 --- a/mesonbuild/backend/xcodebackend.py +++ b/mesonbuild/backend/xcodebackend.py @@ -1454,7 +1454,9 @@ class XCodeBackend(backends.Backend): file_arr.add_item(self.custom_target_output_buildfile[o], os.path.join(self.environment.get_build_dir(), o)) elif isinstance(gt, build.CustomTargetIndex): + output_dir = self.get_custom_target_output_dir(gt) for o in gt.get_outputs(): + o = os.path.join(output_dir, o) file_arr.add_item(self.custom_target_output_buildfile[o], os.path.join(self.environment.get_build_dir(), o)) elif isinstance(gt, build.GeneratedList): -- cgit v1.2.3