I have a target that contains Objective-C source files and builds a static 
library for iOS. It works fine. I just tried adding a single Swift file to it, 
and now it fails to build, with a strange link-time error:
        libtool: unknown option character `X' in: -Xlinker
which sounds like Xcode is using a command-line flag that libtool doesn’t 
understand. A bug in Xcode, maybe? (I’m using the latest beta of 6.3: 6D554n.)

If I remove the .swift file from the target, it builds file. Re-add it, I get 
the error. I’ve checked the target build settings and there’s no custom 
“-Xlinker” flag defined, so this must be something Xcode came up with on its 
own.

Here’s the entire command line generated by Xcode, and the entire error message:

    
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool
 -static -arch_only x86_64 -syslibroot 
/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.3.sdk
 -L/Couchbase/Seekrit/build/Seekrit/Build/Products/Debug-iphonesimulator 
-filelist 
/Couchbase/Seekrit/build/Seekrit/Build/Intermediates/Seekrit.build/Debug-iphonesimulator/SeekritIOS.build/Objects-normal/x86_64/SeekritIOS.LinkFileList
 
-L/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator
 -Xlinker -add_ast_path -Xlinker 
/Couchbase/Seekrit/build/Seekrit/Build/Intermediates/Seekrit.build/Debug-iphonesimulator/SeekritIOS.build/Objects-normal/x86_64/SeekritIOS.swiftmodule
 -o 
/Couchbase/Seekrit/build/Seekrit/Build/Products/Debug-iphonesimulator/libSeekritIOS.a

error: 
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool:
 unknown option character `X' in: -Xlinker

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (Xcode-users@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/xcode-users/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to