$ swiftc -v
Apple Swift version 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
Target: x86_64-apple-darwin19.4.0
$ swiftc \
-sdk /Applications/Xcode_11.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk \
-target arm64-apple-ios12.0 \
-swift-version 5 \
-module-name FluentUI \
-emit-library \
-o FluentUI \
-emit-objc-header-path FluentUI-Swift.h \
-emit-module-path FluentUI.swiftmodule \
-parse-as-library \
-Xlinker -install_name -Xlinker @rpath/FluentUI.framework/FluentUI \
-Xlinker -rpath -Xlinker @executable_path/Frameworks \
-Xlinker -rpath -Xlinker @loader_path/Frameworks \
-O -whole-module-optimization \
-gdwarf-types \
# list all .swift files in ios/FluentUI/
Stack dump:
0. Program arguments: /Applications/Xcode_11.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c <list of input swift files> -supplementary-output-file-map /var/folders/43/kxnkpdr551b3fybs7bz_1kwm0000gq/T/supplementaryOutputs-b718af -target arm64-apple-ios12.0 -Xllvm -aarch64-use-tbi -enable-objc-interop -sdk /Applications/Xcode_11.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk -gdwarf-types -swift-version 5 -O -parse-as-library -module-name FluentUI -o /var/folders/43/kxnkpdr551b3fybs7bz_1kwm0000gq/T/FluentUI-187a60.o
1. While emitting IR SIL function "@$s8FluentUI18DateTimePickerViewC4modeAcA0cdeF4ModeO_tcfc".
for 'init(mode:)' (at ios/FluentUI/Date Time Pickers/Date Time Picker/Views/DateTimePickerView.swift:64:5)
0 swift 0x000000010b848a63 PrintStackTraceSignalHandler(void*) + 51
1 swift 0x000000010b848236 SignalHandler(int) + 358
2 libsystem_platform.dylib 0x00007fff5e7dcb5d _sigtramp + 29
3 swift 0x0000000108438c91 swift::Type::transformRec(llvm::function_ref<llvm::Optional<swift::Type> (swift::TypeBase*)>) const + 49
4 libsystem_c.dylib 0x00007fff5e6966a6 abort + 127
5 libsystem_malloc.dylib 0x00007fff5e7a516b malloc_vreport + 545
6 libsystem_malloc.dylib 0x00007fff5e7a4f2c malloc_report + 151
7 swift 0x0000000107e0b803 llvm::DenseMap<swift::Lowering::TypeConverter::CachingTypeKey, swift::Lowering::TypeLowering const*, llvm::DenseMapInfo<swift::Lowering::TypeConverter::CachingTypeKey>, llvm::detail::DenseMapPair<swift::Lowering::TypeConverter::CachingTypeKey, swift::Lowering::TypeLowering const*> >::grow(unsigned int) + 627
8 swift 0x0000000107e0b577 llvm::detail::DenseMapPair<swift::Lowering::TypeConverter::CachingTypeKey, swift::Lowering::TypeLowering const*>* llvm::DenseMapBase<llvm::DenseMap<swift::Lowering::TypeConverter::CachingTypeKey, swift::Lowering::TypeLowering const*, llvm::DenseMapInfo<swift::Lowering::TypeConverter::CachingTypeKey>, llvm::detail::DenseMapPair<swift::Lowering::TypeConverter::CachingTypeKey, swift::Lowering::TypeLowering const*> >, swift::Lowering::TypeConverter::CachingTypeKey, swift::Lowering::TypeLowering const*, llvm::DenseMapInfo<swift::Lowering::TypeConverter::CachingTypeKey>, llvm::detail::DenseMapPair<swift::Lowering::TypeConverter::CachingTypeKey, swift::Lowering::TypeLowering const*> >::InsertIntoBucketImpl<swift::Lowering::TypeConverter::CachingTypeKey>(swift::Lowering::TypeConverter::CachingTypeKey const&, swift::Lowering::TypeConverter::CachingTypeKey const&, llvm::detail::DenseMapPair<swift::Lowering::TypeConverter::CachingTypeKey, swift::Lowering::TypeLowering const*>*) + 103
9 swift 0x0000000107e09ff2 swift::Lowering::TypeConverter::getTypeLowering(swift::Lowering::AbstractionPattern, swift::Type, swift::ResilienceExpansion) + 1762
10 swift 0x0000000107e0d0ff (anonymous namespace)::TypeClassifier::visitAnyStructType(swift::CanType, swift::StructDecl*) + 335
11 swift 0x0000000107e0bff2 (anonymous namespace)::LowerType::visitAnyStructType(swift::CanType, swift::StructDecl*) + 338
12 swift 0x0000000107e09bd2 swift::Lowering::TypeConverter::getTypeLowering(swift::Lowering::AbstractionPattern, swift::Type, swift::ResilienceExpansion) + 706
13 swift 0x0000000107e0d0ff (anonymous namespace)::TypeClassifier::visitAnyStructType(swift::CanType, swift::StructDecl*) + 335
14 swift 0x0000000107e0bd07 (anonymous namespace)::LowerType::visitAnyEnumType(swift::CanType, swift::EnumDecl*) + 551
15 swift 0x0000000107e09bd2 swift::Lowering::TypeConverter::getTypeLowering(swift::Lowering::AbstractionPattern, swift::Type, swift::ResilienceExpansion) + 706
16 swift 0x0000000107697465 swift::irgen::IRGenModule::getTypeInfoForUnlowered(swift::Lowering::AbstractionPattern, swift::Type) + 101
17 swift 0x00000001076b4835 (anonymous namespace)::IRGenDebugInfoImpl::createType(swift::irgen::DebugTypeInfo, llvm::StringRef, llvm::DIScope*, llvm::DIFile*) + 8117
18 swift 0x00000001076b203c (anonymous namespace)::IRGenDebugInfoImpl::getOrCreateType(swift::irgen::DebugTypeInfo) + 2620
19 swift 0x00000001076b4990 (anonymous namespace)::IRGenDebugInfoImpl::createType(swift::irgen::DebugTypeInfo, llvm::StringRef, llvm::DIScope*, llvm::DIFile*) + 8464
20 swift 0x00000001076b203c (anonymous namespace)::IRGenDebugInfoImpl::getOrCreateType(swift::irgen::DebugTypeInfo) + 2620
21 swift 0x00000001076b1243 (anonymous namespace)::IRGenDebugInfoImpl::createParameterTypes(swift::CanTypeWrapper<swift::SILFunctionType>) + 931
22 swift 0x00000001076b038f (anonymous namespace)::IRGenDebugInfoImpl::emitFunction(swift::SILDebugScope const*, llvm::Function*, swift::SILFunctionTypeRepresentation, swift::SILType, swift::DeclContext*) + 3167
23 swift 0x00000001076ad817 (anonymous namespace)::IRGenDebugInfoImpl::getOrCreateScope(swift::SILDebugScope const*) + 1415
24 swift 0x00000001076ae9d4 (anonymous namespace)::IRGenDebugInfoImpl::createInlinedAt(swift::SILDebugScope const*) + 788
25 swift 0x00000001076ad191 (anonymous namespace)::IRGenDebugInfoImpl::setCurrentLoc(swift::irgen::IRBuilder&, swift::SILDebugScope const*, swift::SILLocation) + 1585
26 swift 0x00000001076c90f1 swift::irgen::IRGenModule::emitSILFunction(swift::SILFunction*) + 3217
27 swift 0x00000001075789e7 swift::irgen::IRGenerator::emitLazyDefinitions() + 9303
28 swift 0x00000001076a78e0 performIRGeneration(swift::IRGenOptions&, swift::ModuleDecl*, std::__1::unique_ptr<swift::SILModule, std::__1::default_delete<swift::SILModule> >, llvm::StringRef, swift::PrimarySpecificPaths const&, llvm::LLVMContext&, swift::SourceFile*, llvm::GlobalVariable**) + 1344
29 swift 0x00000001076a4fe9 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**) + 825
30 swift 0x00000001074928fe performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 36542
31 swift 0x0000000107486234 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 6820
32 swift 0x0000000107413733 main + 1219
33 libdyld.dylib 0x00007fff5e5f13d5 start + 1
34 libdyld.dylib 0x0000000000000089 start + 2711678133
<unknown>:0: error: unable to execute command: Abort trap: 6
<unknown>:0: error: compile command failed due to signal 6 (use -v to see invocation)
It should build without crashing compilers. Since Xcode 11+ is supported.
This cannot be reproduced with Xcode 11.4.1.