Skip to content

Commit 58c83b4

Browse files
committed
Enable swiftinterface verification with compatiblity headers
Lift the workaround that disabled scheduling the swiftinterface verification task when a compatibility header is generated. This is an issue only when the header is also installed, we now expect the build system to disable the verification when it installs the header. This issue lead to errors on missing headers and failures to build the underlying clang module at verification. rdar://100989723
1 parent effef46 commit 58c83b4

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

Sources/SwiftDriver/Jobs/Planning.swift

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -510,13 +510,6 @@ extension Driver {
510510
// Don't verify by default modules emitted from a merge-module job
511511
// as it's more likely to be invalid.
512512
emitModuleSeparately || compilerMode == .singleCompile ||
513-
parsedOptions.hasFlag(positive: .verifyEmittedModuleInterface,
514-
negative: .noVerifyEmittedModuleInterface,
515-
default: false),
516-
517-
// Don't verify by default modules emitting a compatibility header. This is
518-
// unsupported as the headers are merged after all archs are built. rdar://90864986
519-
self.objcGeneratedHeaderPath == nil ||
520513
parsedOptions.hasFlag(positive: .verifyEmittedModuleInterface,
521514
negative: .noVerifyEmittedModuleInterface,
522515
default: false)

Tests/SwiftDriverTests/SwiftDriverTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5262,14 +5262,14 @@ final class SwiftDriverTests: XCTestCase {
52625262
XCTAssertFalse(verifyJob.commandLine.contains(.flag("-check-api-availability-only")))
52635263
}
52645264

5265-
// Don't verify modules with compatibility headers.
5265+
// Do verify modules with compatibility headers.
52665266
do {
52675267
var driver = try Driver(args: ["swiftc", "foo.swift", "-emit-module", "-module-name",
52685268
"foo", "-emit-module-interface",
52695269
"-enable-library-evolution", "-emit-objc-header-path", "foo-Swift.h"],
52705270
env: envVars)
52715271
let plannedJobs = try driver.planBuild()
5272-
XCTAssertEqual(plannedJobs.filter( { job in job.kind == .verifyModuleInterface}).count, 0)
5272+
XCTAssertEqual(plannedJobs.filter( { job in job.kind == .verifyModuleInterface}).count, 1)
52735273
}
52745274
}
52755275

0 commit comments

Comments
 (0)