You have to change some swiftc options to build the project against proper sdk and target
swift build -Xswiftc "-sdk" -Xswiftc "`xcrun --sdk iphonesimulator --show-sdk-path`" -Xswiftc "-target" -Xswiftc "x86_64-apple-ios13.0-simulator"
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…