Skip to content

Commit 888f5f9

Browse files
committed
Support -print-educational-notes
1 parent d230d68 commit 888f5f9

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

Sources/SwiftDriver/Jobs/FrontendJobHelpers.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ extension Driver {
141141
try commandLine.appendLast(.enableFineGrainedDependencies, from: &parsedOptions)
142142
try commandLine.appendLast(.fineGrainedDependencyIncludeIntrafile, from: &parsedOptions)
143143
try commandLine.appendLast(.enableExperimentalConcisePoundFile, from: &parsedOptions)
144+
try commandLine.appendLast(.printEducationalNotes, from: &parsedOptions)
144145
try commandLine.appendAll(.D, from: &parsedOptions)
145146
try commandLine.appendAll(.sanitizeEQ, from: &parsedOptions)
146147
try commandLine.appendAllArguments(.debugPrefixMap, from: &parsedOptions)

Tests/SwiftDriverTests/SwiftDriverTests.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1576,6 +1576,14 @@ final class SwiftDriverTests: XCTestCase {
15761576
XCTAssertEqual($0 as? Driver.Error, Driver.Error.conflictingOptions(.warningsAsErrors, .suppressWarnings))
15771577
}
15781578
}
1579+
1580+
do {
1581+
var driver = try Driver(args: ["swift", "-print-educational-notes", "foo.swift"])
1582+
let plannedJobs = try driver.planBuild()
1583+
XCTAssertEqual(plannedJobs.count, 1)
1584+
let job = plannedJobs[0]
1585+
XCTAssertTrue(job.commandLine.contains(.flag("-print-educational-notes")))
1586+
}
15791587
}
15801588

15811589
func testPCHGeneration() throws {

0 commit comments

Comments
 (0)