Skip to content

Commit

Permalink
backend/xcode: replace use of CustomTarget method with open code
Browse files Browse the repository at this point in the history
This function isn't supposed to be used for build targets, so just open
code this instead. This also gets xcode fully type safe.
  • Loading branch information
dcbaker committed Feb 6, 2025
1 parent dff5086 commit 5295b98
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mesonbuild/backend/xcodebackend.py
Original file line number Diff line number Diff line change
Expand Up @@ -1747,7 +1747,8 @@ def generate_single_build_target(
# It is unclear what is the cwd when xcode runs. -I. does not seem to
# add the root build dir to the search path. So add an absolute path instead.
# This may break reproducible builds, in which case patches are welcome.
cti_args = self.get_custom_target_dir_include_args(target, compiler, absolute_path=True)
cti_args.append('-I{}'.format(os.path.join(self.environment.source_dir, target.subdir)))
cti_args.append('-I{}'.format(os.path.join(self.environment.build_dir, target.subdir)))
# Xcode cannot handle separate compilation flags for C and ObjectiveC. They are both
# put in OTHER_CFLAGS. Same with C++ and ObjectiveC++.
if lang == 'objc':
Expand Down
1 change: 1 addition & 0 deletions run_mypy.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
'mesonbuild/backend/vs2017backend.py',
'mesonbuild/backend/vs2019backend.py',
'mesonbuild/backend/vs2022backend.py',
'mesonbuild/backend/xcodebackend.py',
# 'mesonbuild/coredata.py',
'mesonbuild/depfile.py',
'mesonbuild/envconfig.py',
Expand Down

0 comments on commit 5295b98

Please sign in to comment.