Skip to content

Commit 615d9d4

Browse files
committed
Comment about the use of OTHER_SWIFT_FLAGS
1 parent 5dadddb commit 615d9d4

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Sources/PackageLoading/PackageBuilder.swift

+6-3
Original file line numberDiff line numberDiff line change
@@ -1259,9 +1259,9 @@ public final class PackageBuilder {
12591259
throw InternalError("linker does not support treatAllWarnings")
12601260

12611261
case .swift:
1262-
// TODO: this should be SWIFT_TREAT_WARNINGS_AS_ERRORS
1263-
// but it probably will break the order of the warning control
1264-
// flags (which is important)
1262+
// We can't use SWIFT_WARNINGS_AS_WARNINGS_GROUPS and
1263+
// SWIFT_WARNINGS_AS_ERRORS_GROUPS here.
1264+
// See https://github.com/swiftlang/swift-build/issues/248
12651265
decl = .OTHER_SWIFT_FLAGS
12661266
let flag = switch level {
12671267
case .error: "-warnings-as-errors"
@@ -1292,6 +1292,9 @@ public final class PackageBuilder {
12921292
throw InternalError("linker does not support treatWarning")
12931293

12941294
case .swift:
1295+
// We can't use SWIFT_WARNINGS_AS_WARNINGS_GROUPS and
1296+
// SWIFT_WARNINGS_AS_ERRORS_GROUPS here.
1297+
// See https://github.com/swiftlang/swift-build/issues/248
12951298
decl = .OTHER_SWIFT_FLAGS
12961299
let flag = switch level {
12971300
case .error: "-Werror"

0 commit comments

Comments
 (0)