Skip to content

Commit

Permalink
fix: Xcode 15.3+ not setting TARGET_OS_IOS correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
Logikgate authored Apr 15, 2024
1 parent 3294c4b commit 1713581
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion metadata-generator/build-step-metadata-generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,11 @@ 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
# since iPhoneOS 17.4 sdk TARGET_OS_IPHONE and TARGET_OS_IOS 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(["-DTARGET_OS_IOS=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 1713581

Please sign in to comment.