Skip to content

Commit c5d858b

Browse files
authored
Merge pull request #771 from artemcm/55WarnConcurrency
[5.5] Propagate `-warn-concurrency` to frontend invocations.
2 parents ee5ed92 + a8049f4 commit c5d858b

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

Sources/SwiftDriver/Jobs/FrontendJobHelpers.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ extension Driver {
199199
try commandLine.appendAll(.debugPrefixMap, from: &parsedOptions)
200200
try commandLine.appendAllArguments(.Xfrontend, from: &parsedOptions)
201201
try commandLine.appendAll(.coveragePrefixMap, from: &parsedOptions)
202+
try commandLine.appendLast(.warnConcurrency, from: &parsedOptions)
202203

203204
if let workingDirectory = workingDirectory {
204205
// Add -Xcc -working-directory before any other -Xcc options to ensure it is

Tests/SwiftDriverTests/SwiftDriverTests.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4661,6 +4661,15 @@ final class SwiftDriverTests: XCTestCase {
46614661
}
46624662
}
46634663

4664+
func testWarnConcurrency() throws {
4665+
do {
4666+
var driver = try Driver(args: ["swiftc", "-warn-concurrency", "foo.swift"])
4667+
let plannedJobs = try driver.planBuild()
4668+
let job = plannedJobs[0]
4669+
XCTAssertTrue(job.commandLine.contains(.flag("-warn-concurrency")))
4670+
}
4671+
}
4672+
46644673
func testRelativeResourceDir() throws {
46654674
do {
46664675
var driver = try Driver(args: ["swiftc",

0 commit comments

Comments
 (0)