We have XCode 10.1 and XCode 10.2 on two different mac. The same project is debugging on mac devices and archiving from XCode 10.1. The project is in Swift 4.2. It also has Objective C files.
But it is not archiving from XCode version 10.2. ( It properly run in debug on devices )
Following is the error
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
Please let me have some clues to find the error.
Is it necessary to clear all the warnings ?
Regards
Sanjay
Update 1
Removed arm64 from Build Settings >> Architectures >> Valid Architectures
I Could build the Archive. ( I can not skip arm64, as it is compulsory for deployment )
But it means, one of my used library has issues in build of arm64. Need to find more. Problem could not be solved by XCode update 10.2.1
Update 2
Further searching found the answer at this link on stackoverflow.
the "solution" was to turn swift compiler code generation optimization level to -Onone in build settings for the release configuration.
This could not be a proper or correct solution, but at least for time being, this solution works.