Undefined symbol: ___isOSVersionAtLeast

Sorry for taking so long to follow up on this. I was able to replicate the problem locally. It looks like the toolchains still aren't getting the iOS compiler-rt copied in when they're built. @mishal_shah Do you know what might be going on with that? I'm not too familiar with how we built toolchains. Maybe that process just needs something like the copying code I modified in [Build System: build-script-impl] Fix the compiler-rt copy logic in build-script-impl. by mikeash · Pull Request #27575 · apple/swift · GitHub.

In the meantime, you can work around this by manually copying Xcode's compiler-rt libraries into your toolchain. A command like this will do it:

sudo cp `xcode-select -p`/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/*/lib/darwin/libclang_rt.*.a /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2019-12-03-a.xctoolchain/usr/lib/clang/7.0.0/lib/darwin

I checked here and that fixed it for me. If you still have trouble, let me know!

4 Likes