是否可以使用swift5自定义工具链在Xcode 10.1的设备上进行构建?

时间:2019-05-04 09:52:53

标签: ios swift xcode

我在Xcode 10.1上运行macOS 10.13.6(不建议更新到Mojave和Xcode 10.2 )。 我已经安装了latest swift toolchain,并修改了xcode的Swift.xcspec文件以在构建设置中显示swift 5选项。 当我为模拟器构建时,一切正常正常。但是,当我将其更改为设备时,在 Link 阶段有一个重大问题。

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr
/bin/clang -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platfo
rms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk -L/Users/kirow/Library/Devel
oper/Xcode/DerivedData/SampleIssue-fiylodvxeamqsidzxhdobexryiwz/Build/Products/Deb
ug-iphoneos -F/Users/kirow/Library/Developer/Xcode/DerivedData/SampleIssue-fiylodv
xeamqsidzxhdobexryiwz/Build/Products/Debug-iphoneos -filelist /Users/kirow/Library
/Developer/Xcode/DerivedData/SampleIssue-fiylodvxeamqsidzxhdobexryiwz/Build/Interm
ediates.noindex/SampleIssue.build/Debug-iphoneos/SampleIssue.build/Objects-normal/
arm64/SampleIssue.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Framework
s -miphoneos-version-min=12.1 -dead_strip -Xlinker -object_path_lto -Xlinker /User
s/kirow/Library/Developer/Xcode/DerivedData/SampleIssue-fiylodvxeamqsidzxhdobexryi
wz/Build/Intermediates.noindex/SampleIssue.build/Debug-iphoneos/SampleIssue.build/
Objects-normal/arm64/SampleIssue_lto.o -Xlinker -export_dynamic -Xlinker -no_dedup
licate -fembed-bitcode-marker -fobjc-link-runtime -L/Library/Developer/Toolchains/
swift-5.0.1-RELEASE.xctoolchain/usr/lib/swift/iphoneos -Xlinker -add_ast_path -Xli
nker /Users/kirow/Library/Developer/Xcode/DerivedData/SampleIssue-fiylodvxeamqsidz
xhdobexryiwz/Build/Intermediates.noindex/SampleIssue.build/Debug-iphoneos/SampleIs
sue.build/Objects-normal/arm64/SampleIssue.swiftmodule -Xlinker -dependency_info -
Xlinker /Users/kirow/Library/Developer/Xcode/DerivedData/SampleIssue-fiylodvxeamqs
idzxhdobexryiwz/Build/Intermediates.noindex/SampleIssue.build/Debug-iphoneos/Sampl
eIssue.build/Objects-normal/arm64/SampleIssue_dependency_info.dat -o /Users/kirow/
Library/Developer/Xcode/DerivedData/SampleIssue-fiylodvxeamqsidzxhdobexryiwz/Build
/Products/Debug-iphoneos/SampleIssue.app/SampleIssue
ld: warning: Could not find auto-linked library 'swiftFoundation'
ld: warning: Could not find auto-linked library 'swiftMetal'
ld: warning: Could not find auto-linked library 'swiftDarwin'
ld: warning: Could not find auto-linked library 'swiftUIKit'
ld: warning: Could not find auto-linked library 'swiftCoreFoundation'
ld: warning: Could not find auto-linked library 'swiftQuartzCore'
ld: warning: Could not find auto-linked library 'swiftCore'
ld: warning: Could not find auto-linked library 'swiftCoreGraphics'
ld: warning: Could not find auto-linked library 'swiftObjectiveC'
ld: warning: Could not find auto-linked library 'swiftDispatch'
ld: warning: Could not find auto-linked library 'swiftSwiftOnoneSupport'
ld: warning: Could not find auto-linked library 'swiftCoreImage'

导致

ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

如何使其工作?

0 个答案:

没有答案