Skip to content

Commit e4310d7

Browse files
authored
Merge pull request #67810 from compnerd/interoperation
SwiftCompilerSources: update `Package.swift`
2 parents 3db251c + 561c820 commit e4310d7

File tree

1 file changed

+10
-16
lines changed

1 file changed

+10
-16
lines changed

SwiftCompilerSources/Package.swift

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:5.4
1+
// swift-tools-version:5.9
22
//===--- Package.swift.in - SwiftCompiler SwiftPM package -----------------===//
33
//
44
// This source file is part of the Swift.org open source project
@@ -14,20 +14,6 @@
1414
import PackageDescription
1515

1616
private extension Target {
17-
static let defaultSwiftSettings: [SwiftSetting] = [
18-
.unsafeFlags([
19-
"-Xfrontend", "-validate-tbd-against-ir=none",
20-
"-Xfrontend", "-enable-experimental-cxx-interop",
21-
// Bridging modules and headers
22-
"-Xcc", "-I", "-Xcc", "../include",
23-
// LLVM modules and headers
24-
"-Xcc", "-I", "-Xcc", "../../llvm-project/llvm/include",
25-
// Clang modules and headers
26-
"-Xcc", "-I", "-Xcc", "../../llvm-project/clang/include",
27-
"-cross-module-optimization"
28-
]),
29-
]
30-
3117
static func compilerModuleTarget(
3218
name: String,
3319
dependencies: [Dependency],
@@ -40,7 +26,15 @@ private extension Target {
4026
path: path ?? "Sources/\(name)",
4127
exclude: ["CMakeLists.txt"],
4228
sources: sources,
43-
swiftSettings: defaultSwiftSettings + swiftSettings)
29+
cxxSettings: [
30+
.headerSearchPath("../include"),
31+
.headerSearchPath("../../llvm-project/llvm/include"),
32+
.headerSearchPath("../../llvm-project/clang/include"),
33+
],
34+
swiftSettings: [
35+
.interoperabilityMode(.Cxx),
36+
.unsafeFlags(["-cross-module-optimization"]),
37+
] + swiftSettings)
4438
}
4539
}
4640

0 commit comments

Comments
 (0)