Skip to content

Conversation

@karim-alweheshy
Copy link
Contributor

This uses the custom toolchain to inject a toolchain instead of other user defined settings
Required for SwiftUI

@karim-alweheshy karim-alweheshy force-pushed the karim/add-custom-toolchain-to-generated-project branch from 8655dc5 to 0636a1e Compare March 23, 2025 11:21
@karim-alweheshy karim-alweheshy changed the title Karim/add custom toolchain to generated project Add custom toolchain to generated project Mar 23, 2025
@karim-alweheshy karim-alweheshy force-pushed the karim/add-custom-toolchain-to-generated-project branch 2 times, most recently from 17dddeb to ba560c8 Compare March 23, 2025 22:52
),
.init(key: "SWIFT_OBJC_INTERFACE_HEADER_NAME", value: #""""#),
.init(key: "SWIFT_OPTIMIZATION_LEVEL", value: #""-Onone""#),
.init(key: "SWIFT_USE_INTEGRATED_DRIVER", value: "NO"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome ... thanks for cleaning these up in this PR as well.

unset toolchain
fi
fi

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@karim-alweheshy karim-alweheshy force-pushed the karim/add-custom-toolchain-to-generated-project branch 3 times, most recently from bbc7b23 to 93c1f9e Compare April 3, 2025 00:17
@karim-alweheshy karim-alweheshy force-pushed the karim/add-custom-toolchain-to-generated-project branch from 3fef9e1 to c782d46 Compare July 7, 2025 16:47
jeffhodsdon added a commit to jeffhodsdon/rules_xcodeproj that referenced this pull request Dec 16, 2025
This commit enables working SwiftUI Previews in Xcode for projects using
rules_xcodeproj with BwX (Build with Xcode) mode.

Fixes:
- Filter LINKED_BINARY= from linker arguments (wrapped_clang specific)
- Filter -objc_abi_version malformed arguments (skip 3 args)
- Filter -Wl,-objc_abi_version,2 (Xcode sets this itself)
- Exclude merged product files from linking to prevent duplicate symbols
- Enable ENABLE_DEBUG_DYLIB and ENABLE_DEFAULT_SEARCH_PATHS
- Disable custom TOOLCHAINS (causes module issues with previews)
- Add ENABLE_DEBUG_DYLIB check to Create Link Dependencies build phase
- Unique toolchain names per workspace (prevents conflicts)
- Pass through preview-related flags in clang.sh

Builds on PRs MobileNativeFoundation#3139 and MobileNativeFoundation#3140.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
jeffhodsdon added a commit to jeffhodsdon/rules_xcodeproj that referenced this pull request Dec 16, 2025
This commit enables working SwiftUI Previews in Xcode for projects using
rules_xcodeproj with BwX (Build with Xcode) mode.

Fixes:
- Filter LINKED_BINARY= from linker arguments (wrapped_clang specific)
- Filter -objc_abi_version malformed arguments (skip 3 args)
- Filter -Wl,-objc_abi_version,2 (Xcode sets this itself)
- Exclude merged product files from linking to prevent duplicate symbols
- Enable ENABLE_DEBUG_DYLIB and ENABLE_DEFAULT_SEARCH_PATHS
- Disable custom TOOLCHAINS (causes module issues with previews)
- Add ENABLE_DEBUG_DYLIB check to Create Link Dependencies build phase
- Unique toolchain names per workspace (prevents conflicts)
- Pass through preview-related flags in clang.sh

Builds on PRs MobileNativeFoundation#3139 and MobileNativeFoundation#3140.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants