Skip to content

Commit

Permalink
fix: Xcode 15.3+ not setting TARGET_OS_IPHONE correctly (#242)
Browse files Browse the repository at this point in the history
  • Loading branch information
edusperoni authored and rigor789 committed Mar 13, 2024
1 parent f518b71 commit d2f4ee4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions metadata-generator/build-step-metadata-generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@ def generate_metadata(arch):
deployment_target_flag_name + "=" + deployment_target])
else:
generator_call.extend(["-target", "{}-{}-{}{}".format(arch, llvm_target_triple_vendor, llvm_target_triple_os_version, llvm_target_triple_suffix)])
# since iPhoneOS 17.4 sdk TARGET_OS_IPHONE is not defined for non-simulator builds
# this seems to be a bug on Apple's side
if effective_platform_name == "-iphoneos" and not llvm_target_triple_suffix:
generator_call.extend(["-DTARGET_OS_IPHONE=1"])

generator_call.extend(header_search_paths_parsed) # HEADER_SEARCH_PATHS
generator_call.extend(framework_search_paths_parsed) # FRAMEWORK_SEARCH_PATHS
Expand Down

0 comments on commit d2f4ee4

Please sign in to comment.