Skip to content

Commit e6b1637

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 f16a26a commit e6b1637

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
@@ -2084,7 +2084,7 @@ extension Driver {
20842084
case .indexFile:
20852085
compilerOutputType = .indexData
20862086

2087-
case .parse, .resolveImports, .typecheck, .experimentalLazyTypecheck,
2087+
case .parse, .resolveImports, .typecheck,
20882088
.dumpParse, .printAst, .dumpTypeRefinementContexts, .dumpScopeMaps,
20892089
.dumpInterfaceHash, .dumpTypeInfo, .verifyDebugInfo:
20902090
compilerOutputType = nil

Sources/SwiftDriver/Jobs/EmitModuleJob.swift

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

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

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

Sources/SwiftOptions/Options.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ extension Option {
439439
public static let driverExperimentalExplicitModuleBuild: Option = Option("-experimental-explicit-module-build", .flag, alias: Option.driverExplicitModuleBuild, attributes: [.helpHidden], helpText: "Prebuild module dependencies to make them explicit")
440440
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")
441441
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")
442-
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)
442+
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")
443443
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")
444444
public static let ExperimentalPerformanceAnnotations: Option = Option("-experimental-performance-annotations", .flag, attributes: [.helpHidden, .frontend], helpText: "Deprecated, has no effect")
445445
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
@@ -7261,16 +7261,6 @@ final class SwiftDriverTests: XCTestCase {
72617261
]))
72627262
}
72637263
}
7264-
7265-
func testEmitModuleExperimentalLazyTypecheck() throws {
7266-
var driver = try Driver(args: [
7267-
"swiftc", "test.swift", "-module-name", "Test", "-experimental-lazy-typecheck", "-emit-module-interface"
7268-
])
7269-
let jobs = try driver.planBuild().removingAutolinkExtractJobs()
7270-
let emitModuleJob = try XCTUnwrap(jobs.first(where: {$0.kind == .emitModule}))
7271-
XCTAssertTrue(emitModuleJob.commandLine.contains(.flag("-experimental-lazy-typecheck")))
7272-
XCTAssertTrue(emitModuleJob.commandLine.contains(.flag("-experimental-skip-non-exportable-decls")))
7273-
}
72747264
}
72757265

72767266
func assertString(

0 commit comments

Comments
 (0)