Karim/fix xcode previews#3124
Draft
karim-alweheshy wants to merge 6 commits intoMobileNativeFoundation:mainfrom
Draft
Karim/fix xcode previews#3124karim-alweheshy wants to merge 6 commits intoMobileNativeFoundation:mainfrom
karim-alweheshy wants to merge 6 commits intoMobileNativeFoundation:mainfrom
Conversation
karim-alweheshy
commented
Dec 27, 2024
| developer_dir="${1/\/Platforms\/*/}" | ||
| ;; | ||
|
|
||
| *.debug.dylib) |
Contributor
Author
There was a problem hiding this comment.
need to verify this on an App previews
karim-alweheshy
commented
Dec 27, 2024
| exit(1) | ||
| } | ||
|
|
||
| if let outputFileMapURL = paths[.supplementaryOutputFileMap] { |
Contributor
Author
There was a problem hiding this comment.
without that i got an error
Showing All Messages
Error opening '/Users/karim.alweheshy/Library/Developer/Xcode/DerivedData/TestModule_Feature-dtbqdukuomtoamfwbeaihszmgzda/Build/Intermediates.noindex/TestModule_Feature.build/bazel-out/ios_sim_arm64-dbg-ios-sim_arm64-min15.0-applebin_ios-ST-4f30668f84b0/bin/Modules/TestModule/TestModule/Objects-normal/arm64/TestModule.swiftconstvalues' for output: /Users/karim.alweheshy/Library/Developer/Xcode/DerivedData/TestModule_Feature-dtbqdukuomtoamfwbeaihszmgzda/Build/Intermediates.noindex/TestModule_Feature.build/bazel-out/ios_sim_arm64-dbg-ios-sim_arm64-min15.0-applebin_ios-ST-4f30668f84b0/bin/Modules/TestModule/TestModule/Objects-normal/arm64/TestModule.swiftconstvalues: Operation not permitted
karim-alweheshy
commented
Dec 27, 2024
| # Product is a binary, so symlink instead of rsync, to allow for Bazel-set | ||
| # rpaths to work | ||
| ln -sfh "$PWD/$BAZEL_OUTPUTS_PRODUCT_BASENAME" "$TARGET_BUILD_DIR/$PRODUCT_NAME" | ||
| ln -sfh "$PWD/$BAZEL_OUTPUTS_PRODUCT_BASENAME" "$TARGET_BUILD_DIR/lib$PRODUCT_NAME.a" |
Contributor
Author
There was a problem hiding this comment.
SwiftUIP Previews run
libtool called with arguments: -static -arch_only arm64 -D -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.1.sdk -L/Users/karim.alweheshy/Library/Developer/Xcode/DerivedData/TestProject-cnscizqkxdbvwacrakshbzzkcnub/Build/Products/Debug-iphonesimulator -filelist /Users/karim.alweheshy/Library/Developer/Xcode/DerivedData/TestProject-cnscizqkxdbvwacrakshbzzkcnub/Build/Intermediates.noindex/Impl.build/Debug-iphonesimulator/Impl.build/Objects-normal/arm64/Impl.LinkFileList -dependency_info /Users/karim.alweheshy/Library/Developer/Xcode/DerivedData/TestProject-cnscizqkxdbvwacrakshbzzkcnub/Build/Intermediates.noindex/Impl.build/Debug-iphonesimulator/Impl.build/Objects-normal/arm64/Impl_libtool_dependency_info.dat -o /Users/karim.alweheshy/Library/Developer/Xcode/DerivedData/TestProject-cnscizqkxdbvwacrakshbzzkcnub/Build/Products/Debug-iphonesimulator/libImpl.a
karim-alweheshy
commented
Dec 27, 2024
| ), | ||
| .init(key: "SWIFT_OBJC_INTERFACE_HEADER_NAME", value: #""""#), | ||
| .init(key: "SWIFT_OPTIMIZATION_LEVEL", value: #""-Onone""#), | ||
| .init(key: "SWIFT_USE_INTEGRATED_DRIVER", value: "NO"), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

I used this technique to point swiftc to rules_xcodeproj swiftc stub. This is now done manually to unblock the main part of the project but would need to be incorporated somehow eventually
WIP
Two things, pointing xcode to the custom toolchain and pointing the custom toolchain swiftc to rules_xcodeproj swiftc stub
I guess the next change would be for swiftc stub to diff between xcode commands (ignore except swiftui previews) and bazel commands (pass through)