-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPackage.swift
More file actions
56 lines (52 loc) · 1.58 KB
/
Package.swift
File metadata and controls
56 lines (52 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// swift-tools-version: 6.2
// SPDX-License-Identifier: 0BSD
// SPDX-FileCopyrightText: © 2026 Sebastian Ritter
import PackageDescription
// Target we need
let TARGET = "aarch64-none-none-elf"
let package = Package(
name: "SOS",
// Hint for you to see the language of pseudo target
defaultLocalization: "de",
// it works also with .v15 and Swift 6.0 but I have both (Swift 6.2 and macOS Tahoe)
// with using of InlineArray instead of Tupel macOS Tahoe is required
platforms: [.macOS(.v26)],
dependencies: [
// other dependencies
.package(url: "https://github.com/swiftlang/swift-docc-plugin", from: "1.1.0"),
],
targets: [
// Swift-only target
.target(
name: "Kernel",
path: "Sources/Kernel",
// DO NOT use
// .unsafeFlags(["-lto=llvm-full",], .when(configuration: .release)),
// because kmain is remove by optimizing
swiftSettings: [
.enableExperimentalFeature("Embedded"),
.enableExperimentalFeature("Extern"),
.enableExperimentalFeature("SymbolLinkageMarkers"),
.unsafeFlags([
"-target", TARGET,
"-wmo",
]),
.unsafeFlags([
"-Xfrontend", "-disable-stack-protector",
"-Xllvm", "-relocation-model=pic",
]),
.unsafeFlags([
"-Xfrontend", "-disable-implicit-concurrency-module-import",
]),
]
),
// Pseudo target to create a documentation
/*START
.target(
name: "SOS",
dependencies: [], // no dependency because no sources
swiftSettings: [], // overwrite Swift settings
)
END*/
]
)