Files
swift-mirror/libswift/Package.swift
Erik Eckstein 809ce72e05 libswift: build support for the initial libswift
* add the (still empty) libswift package
* add build support for libswift in CMake
* add libswift to swift-frontend and sil-opt

The build can be controlled with the LIBSWIFT_BUILD_MODE cmake variable: by default it’s “DISABLE”, which means that libswift is not built. If it’s “HOSTTOOLS”, libswift is built with a pre-installed toolchain on the host system.
2021-06-09 11:25:15 +02:00

37 lines
821 B
Swift

// swift-tools-version:5.3
import PackageDescription
let package = Package(
name: "libswift",
platforms: [
.macOS("10.9"),
],
products: [
.library(
name: "Swift",
type: .static,
targets: ["SIL", "Optimizer"]),
],
dependencies: [
],
// Note that all modules must be added to LIBSWIFT_MODULES in the top-level
// CMakeLists.txt file to get debugging working.
targets: [
.target(
name: "SIL",
dependencies: [],
swiftSettings: [SwiftSetting.unsafeFlags([
"-I", "../include/swift",
"-cross-module-optimization"
])]),
.target(
name: "Optimizer",
dependencies: ["SIL"],
swiftSettings: [SwiftSetting.unsafeFlags([
"-I", "../include/swift",
"-cross-module-optimization"
])]),
]
)