[swift-users] Help with swiftc target

Marcel Rebouças mscreboucas at gmail.com
Sat Feb 27 13:27:50 CST 2016


Hello all,


I’ve been trying to use the ‘swiftc’ command from the version I built from
the source (build-script, swift-2.2-branch), and I am having problems with
the targets.


For example, I am able to use the command below just fine (which I believe
uses the swiftc I got with Xcode - version 2.1.1)


*$ xcrun -sdk iphoneos swiftc -target armv7-apple-ios8.0 *.swift*


But when I try to use it with my swiftc (version 2.2-dev), I receive an
error saying that it was unable to load a standard library for the target.
I also tried with the other targets at the end of the email.


*$ xcrun -sdk iphoneos
…/build/Ninja-DebugAssert/swift-macosx-x86_64/bin/swiftc -target
armv7-apple-ios8.0 *.swift*

*error: **unable to load standard library for target 'armv7-apple-ios8.0’*



It seems it is just working if I use the macosx sdk, but I wish to use the -sdk
iphoneos  or -sdk iphonesimulator to be able to import UIKit inside the
.swift file.


Do I have to build in a different way in order to use those targets? Or am
I doing something wrong? Maybe it has something to do with the contents of
the */Ninja-DebugAssert/swift-macosx-x86_64/* folder?



Thanks,

Marcel




The build-script log showed multiple targets.


OS X SDK:

Version: 10.11

Deployment version: 10.9

Library subduer: macosx

Version min name: macosx

Architectures: x86_64

Triple for x86_64 is x86_64-apple-macosx10.9


iOS SDK:

Version: 9.2

Deployment version: 7.0

Library subduer: iphoneos

Version min name: ios

Architectures: armv7;armv7s;arm64

Triple for armv7 is armv7-apple-ios7.0

Triple for armv7s is armv7s-apple-ios7.0

Triple for arm64 is arm64-apple-ios7.0


iOS Simulator SDK:

Version: 9.2

Deployment version: 7.0

Library subduer: iphonesimulator

Version min name: iso-simulator

Architectures: i386;x86_64

Triple for i386 is i386-apple-ios7.0

Triple for x86_64 is x86_64-apple-ios7.0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20160227/274ad081/attachment.html>


More information about the swift-users mailing list