mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
* 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.
37 lines
821 B
Swift
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"
|
|
])]),
|
|
]
|
|
)
|