swift-toolchain-ios icon indicating copy to clipboard operation
swift-toolchain-ios copied to clipboard

Support for Swift 5

Open michaelnew opened this issue 5 years ago • 3 comments

I've been trying to get a Swift 5 toolchain built for the past couple days, and I'm not having any luck. It looks like the clang directory has changed, so I had to change the clang patch line to this: sed -i '' -e 's;__has_include(<CoreServices/CoreServices.h>);__has_include(<FSEvents/FSEvents.h>);g' llvm-project/clang/lib/DirectoryWatcher/DirectoryWatcher.cpp (I'm assuming this is still needed).

The real problem though is that I cannot for the life of me get the utils/build-script to actually work. I've tried the swift-5.1.3-RELEASE tag, master, swift-5.1-branch, swift-5.2-branch, and used whatever combination of build parameters I can think of. I've tried building with macOS Catalina as well as Ubuntu 18.04. I end up with errors like: export called with target "swiftSwiftLang-macosx-x86_64" which requires target "sourcekitd" that is not in any export set. or: -- Looking for include file xpc/xpc.h - not found

I know those aren't aren't necessarily problems with this repo and may have more to do with compiling the swift toolchain in general, but do you have any insight on that or know how to make it happy? I'm working on an iOS app in Swift that needs a third party framework that's been compiled for Swift 5, and I'm pretty desperate to get a working Swift 5 toolchain I can use.

michaelnew avatar Jan 27 '20 21:01 michaelnew

I think there’s been a bunch of changes to the build-script[-impl] stuff since I last got the iOS toolchain to successfully build. Maybe take a look at the iOS preset in the Swift repo? I‘m busy until mid-March so if you manage to figure it out before that it would be great if you could make a PR.

kabiroberai avatar Jan 31 '20 13:01 kabiroberai

Were you ever able to get this working?

demhademha avatar Sep 05 '20 08:09 demhademha

@demhademha I wasn't, but I may give it another shot soon.

michaelnew avatar Sep 06 '20 05:09 michaelnew