2

我们在两个不同的 mac 上有 XCode 10.1 和 XCode 10.2。同一个项目正在 mac 设备上调试并从 XCode 10.1 存档。该项目在 Swift 4.2 中。它也有 Objective C 文件。

但它不是从 XCode 版本 10.2 归档的。(它在设备上的调试中正确运行)

以下是错误

 CompileSwift normal arm64 (in target:
 .....
 ..... warnings .....
 .....
 2. While running pass #13773 SILModuleTransform "LoadableByAddress".
 0  swift                    0x000000010e0a2ee3 PrintStackTraceSignalHandler(void*) + 51
 1  swift                    0x000000010e0a26bc SignalHandler(int) + 348
 2  libsystem_platform.dylib 0x00007fff589b5b3d _sigtramp + 29
 3  libsystem_platform.dylib 0x0000000000000008 _sigtramp + 2808390888
 4  swift                    0x000000010a139059 (anonymous namespace)::LoadableByAddress::runOnFunction(swift::SILFunction*) + 15961
 5  swift                    0x000000010a131a8b (anonymous namespace)::LoadableByAddress::run() + 75
 6  swift                    0x000000010acfa308 swift::SILPassManager::execute() + 7416
 7  swift                    0x000000010a0e451b runIRGenPreparePasses(swift::SILModule&, swift::irgen::IRGenModule&) + 1739
 8  swift                    0x000000010a0e2be0 swift::performIRGeneration(swift::IRGenOptions&, swift::ModuleDecl*, std::__1::unique_ptr<swift::SILModule, std::__1::default_delete<swift::SILModule> >, llvm::StringRef, swift::PrimarySpecificPaths const&, llvm::LLVMContext&, llvm::ArrayRef<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, llvm::GlobalVariable**) + 1392
 9  swift                    0x0000000109f07030 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 49280
 10 swift                    0x0000000109ef76de swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 6862
 11 swift                    0x0000000109e957be main + 1246
 12 libdyld.dylib            0x00007fff587caed9 start + 1
 13 libdyld.dylib            0x000000000000004b start + 2810401139
 error: Segmentation fault: 11

请让我有一些线索来找到错误。

是否有必要清除所有警告?

问候

桑杰

更新 1

从 Build Settings >> Architectures >> Valid Architectures 中移除 arm64

我可以建立档案。(我不能跳过 arm64,因为部署是必须的)

但这意味着,我使用的一个库在构建 arm64 时存在问题。需要找到更多。XCode 更新 10.2.1 无法解决问题

更新 2

进一步搜索在stackoverflow上的这个链接找到了答案。

“解决方案”是在发布配置的构建设置中将快速编译器代码生成优化级别转换为 -Onone。

这不可能是一个适当或正确的解决方案,但至少在目前,这个解决方案是有效的。

4

0 回答 0