Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Xcode 15.3+ not setting TARGET_OS_IOS correctly #248

Merged
merged 1 commit into from
Apr 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading