Skip to content

Commit abbf439

Browse files
committed
Remove special handling of the -experimental-lazy-typecheck flag.
For now, the flag will simply be a frontend flag and the build system will pass it directly using `-Xfrontend` when appropriate. Resolves rdar://117168788
1 parent c5db212 commit abbf439

File tree

4 files changed

+2
-17
lines changed

4 files changed

+2
-17
lines changed

Sources/SwiftDriver/Driver/Driver.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2096,7 +2096,7 @@ extension Driver {
20962096
case .indexFile:
20972097
compilerOutputType = .indexData
20982098

2099-
case .parse, .resolveImports, .typecheck, .experimentalLazyTypecheck,
2099+
case .parse, .resolveImports, .typecheck,
21002100
.dumpParse, .printAst, .dumpTypeRefinementContexts, .dumpScopeMaps,
21012101
.dumpInterfaceHash, .dumpTypeInfo, .verifyDebugInfo:
21022102
compilerOutputType = nil

Sources/SwiftDriver/Jobs/EmitModuleJob.swift

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,6 @@ extension Driver {
8585

8686
commandLine.appendFlags("-frontend", "-emit-module", "-experimental-skip-non-inlinable-function-bodies-without-types")
8787

88-
if parsedOptions.hasArgument(.experimentalLazyTypecheck) {
89-
commandLine.appendFlag("-experimental-lazy-typecheck")
90-
commandLine.appendFlag("-experimental-skip-non-exportable-decls")
91-
}
92-
9388
// Add the inputs.
9489
for input in self.inputFiles where input.type.isPartOfSwiftCompilation {
9590
commandLine.append(.path(input.file))

Sources/SwiftOptions/Options.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ extension Option {
440440
public static let driverExperimentalExplicitModuleBuild: Option = Option("-experimental-explicit-module-build", .flag, alias: Option.driverExplicitModuleBuild, attributes: [.helpHidden], helpText: "Prebuild module dependencies to make them explicit")
441441
public static let forceWorkaroundBrokenModules: Option = Option("-experimental-force-workaround-broken-modules", .flag, attributes: [.helpHidden, .frontend, .noDriver], helpText: "Attempt unsafe recovery for imported modules with broken modularization")
442442
public static let experimentalHermeticSealAtLink: Option = Option("-experimental-hermetic-seal-at-link", .flag, attributes: [.helpHidden, .frontend], helpText: "Library code can assume that all clients are visible at linktime, and aggressively strip unused code")
443-
public static let experimentalLazyTypecheck: Option = Option("-experimental-lazy-typecheck", .flag, attributes: [.helpHidden, .frontend, .noInteractive, .doesNotAffectIncrementalBuild], helpText: "Parse input file(s), then type-check lazily as needed to produce requested outputs", group: .modes)
443+
public static let experimentalLazyTypecheck: Option = Option("-experimental-lazy-typecheck", .flag, attributes: [.helpHidden, .frontend, .noInteractive, .doesNotAffectIncrementalBuild], helpText: "Parse input file(s), then type-check lazily as needed to produce requested outputs")
444444
public static let experimentalOneWayClosureParams: Option = Option("-experimental-one-way-closure-params", .flag, attributes: [.helpHidden, .frontend, .noDriver], helpText: "Enable experimental support for one-way closure parameters")
445445
public static let ExperimentalPerformanceAnnotations: Option = Option("-experimental-performance-annotations", .flag, attributes: [.helpHidden, .frontend], helpText: "Deprecated, has no effect")
446446
public static let platformCCallingConventionEQ: Option = Option("-experimental-platform-c-calling-convention=", .joined, alias: Option.platformCCallingConvention, attributes: [.helpHidden, .frontend, .noDriver])

Tests/SwiftDriverTests/SwiftDriverTests.swift

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7216,16 +7216,6 @@ final class SwiftDriverTests: XCTestCase {
72167216
]))
72177217
}
72187218
}
7219-
7220-
func testEmitModuleExperimentalLazyTypecheck() throws {
7221-
var driver = try Driver(args: [
7222-
"swiftc", "test.swift", "-module-name", "Test", "-experimental-lazy-typecheck", "-emit-module-interface"
7223-
])
7224-
let jobs = try driver.planBuild().removingAutolinkExtractJobs()
7225-
let emitModuleJob = try XCTUnwrap(jobs.first(where: {$0.kind == .emitModule}))
7226-
XCTAssertTrue(emitModuleJob.commandLine.contains(.flag("-experimental-lazy-typecheck")))
7227-
XCTAssertTrue(emitModuleJob.commandLine.contains(.flag("-experimental-skip-non-exportable-decls")))
7228-
}
72297219

72307220
func testEmitAPIDescriptorEmitModule() throws {
72317221
try withTemporaryDirectory { path in

0 commit comments

Comments
 (0)