@@ -34,8 +34,6 @@ public struct Driver {
34
34
case missingProfilingData( String )
35
35
case conditionalCompilationFlagHasRedundantPrefix( String )
36
36
case conditionalCompilationFlagIsNotValidIdentifier( String )
37
- case baselineGenerationRequiresTopLevelModule( String )
38
- case optionRequiresAnother( String , String )
39
37
// Explicit Module Build Failures
40
38
case malformedModuleDependency( String , String )
41
39
case missingPCMArguments( String )
@@ -102,10 +100,6 @@ public struct Driver {
102
100
return " unable to load output file map ' \( path) ': no such file or directory "
103
101
case . missingExternalDependency( let moduleName) :
104
102
return " Missing External dependency info for module: \( moduleName) "
105
- case . baselineGenerationRequiresTopLevelModule( let arg) :
106
- return " generating a baseline with ' \( arg) ' is only supported with '-emit-module' or '-emit-module-path' "
107
- case . optionRequiresAnother( let first, let second) :
108
- return " ' \( first) ' cannot be specified if ' \( second) ' is not present "
109
103
}
110
104
}
111
105
}
@@ -294,12 +288,6 @@ public struct Driver {
294
288
/// Path to the Swift module source information file.
295
289
let moduleSourceInfoPath : VirtualPath . Handle ?
296
290
297
- /// Path to the module's digester baseline file.
298
- let digesterBaselinePath : VirtualPath . Handle ?
299
-
300
- /// The mode the API digester should run in.
301
- let digesterMode : DigesterMode
302
-
303
291
/// Force the driver to emit the module first and then run compile jobs. This could be used to unblock
304
292
/// dependencies in parallel builds.
305
293
var forceEmitModuleBeforeCompile : Bool = false
@@ -547,16 +535,6 @@ public struct Driver {
547
535
self . numThreads = Self . determineNumThreads ( & parsedOptions, compilerMode: compilerMode, diagnosticsEngine: diagnosticEngine)
548
536
self . numParallelJobs = Self . determineNumParallelJobs ( & parsedOptions, diagnosticsEngine: diagnosticEngine, env: env)
549
537
550
- var mode = DigesterMode . api
551
- if let modeArg = parsedOptions. getLastArgument ( . digesterMode) ? . asSingle {
552
- if let digesterMode = DigesterMode ( rawValue: modeArg) {
553
- mode = digesterMode
554
- } else {
555
- diagnosticsEngine. emit ( Error . invalidArgumentValue ( Option . digesterMode. spelling, modeArg) )
556
- }
557
- }
558
- self . digesterMode = mode
559
-
560
538
Self . validateWarningControlArgs ( & parsedOptions, diagnosticEngine: diagnosticEngine)
561
539
Self . validateProfilingArgs ( & parsedOptions,
562
540
fileSystem: fileSystem,
@@ -609,7 +587,7 @@ public struct Driver {
609
587
diagnosticEngine: diagnosticEngine,
610
588
toolchain: toolchain,
611
589
targetInfo: frontendTargetInfo)
612
-
590
+
613
591
Self . validateSanitizerAddressUseOdrIndicatorFlag ( & parsedOptions, diagnosticEngine: diagnosticsEngine, addressSanitizerEnabled: enabledSanitizers. contains ( . address) )
614
592
615
593
Self . validateSanitizerRecoverArgValues ( & parsedOptions, diagnosticEngine: diagnosticsEngine, enabledSanitizers: enabledSanitizers)
@@ -685,15 +663,6 @@ public struct Driver {
685
663
outputFileMap: self . outputFileMap,
686
664
moduleName: moduleOutputInfo. name,
687
665
projectDirectory: projectDirectory)
688
- self . digesterBaselinePath = try Self . computeDigesterBaselineOutputPath (
689
- & parsedOptions,
690
- moduleOutputPath: self . moduleOutputInfo. output? . outputPath,
691
- mode: self . digesterMode,
692
- compilerOutputType: compilerOutputType,
693
- compilerMode: compilerMode,
694
- outputFileMap: self . outputFileMap,
695
- moduleName: moduleOutputInfo. name,
696
- projectDirectory: projectDirectory)
697
666
self . swiftInterfacePath = try Self . computeSupplementaryOutputPath (
698
667
& parsedOptions, type: . swiftInterface, isOutputOptions: [ . emitModuleInterface] ,
699
668
outputPath: . emitModuleInterfacePath,
@@ -731,12 +700,6 @@ public struct Driver {
731
700
outputFileMap: self . outputFileMap,
732
701
moduleName: moduleOutputInfo. name)
733
702
734
- Self . validateDigesterArgs ( & parsedOptions,
735
- moduleOutputInfo: moduleOutputInfo,
736
- digesterMode: self . digesterMode,
737
- swiftInterfacePath: self . swiftInterfacePath,
738
- diagnosticEngine: diagnosticsEngine)
739
-
740
703
try verifyOutputOptions ( )
741
704
}
742
705
@@ -2233,36 +2196,6 @@ extension Driver {
2233
2196
}
2234
2197
}
2235
2198
2236
- static func validateDigesterArgs( _ parsedOptions: inout ParsedOptions ,
2237
- moduleOutputInfo: ModuleOutputInfo ,
2238
- digesterMode: DigesterMode ,
2239
- swiftInterfacePath: VirtualPath . Handle ? ,
2240
- diagnosticEngine: DiagnosticsEngine ) {
2241
- if moduleOutputInfo. output? . isTopLevel != true {
2242
- for arg in parsedOptions. arguments ( for: . emitDigesterBaseline, . emitDigesterBaselinePath, . compareToBaselinePath) {
2243
- diagnosticEngine. emit ( Error . baselineGenerationRequiresTopLevelModule ( arg. option. spelling) )
2244
- }
2245
- }
2246
-
2247
- if parsedOptions. hasArgument ( . serializeBreakingChangesPath) && !parsedOptions. hasArgument ( . compareToBaselinePath) {
2248
- diagnosticEngine. emit ( Error . optionRequiresAnother ( Option . serializeBreakingChangesPath. spelling,
2249
- Option . compareToBaselinePath. spelling) )
2250
- }
2251
- if parsedOptions. hasArgument ( . digesterBreakageAllowlistPath) && !parsedOptions. hasArgument ( . compareToBaselinePath) {
2252
- diagnosticEngine. emit ( Error . optionRequiresAnother ( Option . digesterBreakageAllowlistPath. spelling,
2253
- Option . compareToBaselinePath. spelling) )
2254
- }
2255
- if digesterMode == . abi && !parsedOptions. hasArgument ( . enableLibraryEvolution) {
2256
- diagnosticEngine. emit ( Error . optionRequiresAnother ( " \( Option . digesterMode. spelling) abi " ,
2257
- Option . enableLibraryEvolution. spelling) )
2258
- }
2259
- if digesterMode == . abi && swiftInterfacePath == nil {
2260
- diagnosticEngine. emit ( Error . optionRequiresAnother ( " \( Option . digesterMode. spelling) abi " ,
2261
- Option . emitModuleInterface. spelling) )
2262
- }
2263
- }
2264
-
2265
-
2266
2199
static func validateProfilingArgs( _ parsedOptions: inout ParsedOptions ,
2267
2200
fileSystem: FileSystem ,
2268
2201
workingDirectory: AbsolutePath ? ,
@@ -2717,31 +2650,6 @@ extension Driver {
2717
2650
projectDirectory: projectDirectory)
2718
2651
}
2719
2652
2720
- static func computeDigesterBaselineOutputPath(
2721
- _ parsedOptions: inout ParsedOptions ,
2722
- moduleOutputPath: VirtualPath . Handle ? ,
2723
- mode: DigesterMode ,
2724
- compilerOutputType: FileType ? ,
2725
- compilerMode: CompilerMode ,
2726
- outputFileMap: OutputFileMap ? ,
2727
- moduleName: String ,
2728
- projectDirectory: VirtualPath . Handle ?
2729
- ) throws -> VirtualPath . Handle ? {
2730
- // Only emit a baseline if at least of the arguments was provided.
2731
- guard parsedOptions. hasArgument ( . emitDigesterBaseline, . emitDigesterBaselinePath) else { return nil }
2732
- return try computeModuleAuxiliaryOutputPath ( & parsedOptions,
2733
- moduleOutputPath: moduleOutputPath,
2734
- type: mode. baselineFileType,
2735
- isOutput: . emitDigesterBaseline,
2736
- outputPath: . emitDigesterBaselinePath,
2737
- compilerOutputType: compilerOutputType,
2738
- compilerMode: compilerMode,
2739
- outputFileMap: outputFileMap,
2740
- moduleName: moduleName,
2741
- projectDirectory: projectDirectory)
2742
- }
2743
-
2744
-
2745
2653
2746
2654
/// Determine the output path for a module auxiliary output.
2747
2655
static func computeModuleAuxiliaryOutputPath(
0 commit comments