Skip to content

Commit b6783f8

Browse files
committed
SwiftCompilerSources: use unsafeFlags for header searches
As the headers are not part of the Swift package, the safe header search option cannot be used. The use of the unsafe flags enables building the package on Windows.
1 parent 0c957a2 commit b6783f8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

SwiftCompilerSources/Package.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ private extension Target {
2626
path: path ?? "Sources/\(name)",
2727
exclude: ["CMakeLists.txt"],
2828
sources: sources,
29-
cxxSettings: [
30-
.headerSearchPath("../include"),
31-
.headerSearchPath("../../llvm-project/llvm/include"),
32-
.headerSearchPath("../../llvm-project/clang/include"),
33-
],
3429
swiftSettings: [
3530
.interoperabilityMode(.Cxx),
36-
.unsafeFlags(["-cross-module-optimization"]),
31+
.unsafeFlags([
32+
"-Xcc", "-I../include",
33+
"-Xcc", "-I../../llvm-project/llvm/include",
34+
"-Xcc", "-I../../llvm-project/clang/include",
35+
"-cross-module-optimization",
36+
]),
3737
] + swiftSettings)
3838
}
3939
}

0 commit comments

Comments
 (0)