Skip to content

Commit e1a60b0

Browse files
authored
Merge pull request #1148 from apple/revertfailingpr
Revert pull request #1147
2 parents 3294e33 + 673a547 commit e1a60b0

File tree

4 files changed

+5
-70
lines changed

4 files changed

+5
-70
lines changed

Sources/SwiftDriver/ExplicitModuleBuilds/ExplicitDependencyBuildPlanner.swift

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -50,19 +50,14 @@ public typealias ExternalTargetModuleDetailsMap = [ModuleDependencyId: ExternalT
5050
/// We avoid re-running the hash computation with the use of this cache
5151
private var hashedModuleNameCache: [String: String] = [:]
5252

53-
/// Does this compile support `.ignoreInterfaceProvidedOptions`
54-
private var supportsIgnoreInterfaceFlags: Bool
55-
5653
public init(dependencyGraph: InterModuleDependencyGraph,
5754
toolchain: Toolchain,
58-
integratedDriver: Bool = true,
59-
supportsIgnoreInterfaceFlags: Bool = false) throws {
55+
integratedDriver: Bool = true) throws {
6056
self.dependencyGraph = dependencyGraph
6157
self.toolchain = toolchain
6258
self.integratedDriver = integratedDriver
6359
self.mainModuleName = dependencyGraph.mainModuleName
6460
self.reachabilityMap = try dependencyGraph.computeTransitiveClosure()
65-
self.supportsIgnoreInterfaceFlags = supportsIgnoreInterfaceFlags
6661
}
6762

6863
/// Generate build jobs for all dependencies of the main module.
@@ -170,12 +165,6 @@ public typealias ExternalTargetModuleDetailsMap = [ModuleDependencyId: ExternalT
170165
}
171166
}
172167

173-
if supportsIgnoreInterfaceFlags {
174-
// Ensure the compiler flags specified in the interface are ignored
175-
// because they are already captured in the dependency scanner output
176-
commandLine.appendFlag(.ignoreInterfaceProvidedOptions)
177-
}
178-
179168
// Set the output path
180169
commandLine.appendFlag(.o)
181170
commandLine.appendPath(VirtualPath.lookup(moduleInfo.modulePath.path))

Sources/SwiftDriver/Jobs/Planning.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -626,9 +626,7 @@ extension Driver {
626626
explicitDependencyBuildPlanner =
627627
try ExplicitDependencyBuildPlanner(dependencyGraph: dependencyGraph,
628628
toolchain: toolchain,
629-
integratedDriver: integratedDriver,
630-
supportsIgnoreInterfaceFlags:
631-
isFrontendArgSupported(.ignoreInterfaceProvidedOptions))
629+
integratedDriver: integratedDriver)
632630

633631
return try explicitDependencyBuildPlanner!.generateExplicitModuleDependenciesBuildJobs()
634632
}

Sources/SwiftOptions/Options.swift

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ extension Option {
127127
public static let disableDebuggerShadowCopies: Option = Option("-disable-debugger-shadow-copies", .flag, attributes: [.helpHidden, .frontend, .noDriver], helpText: "Disable debugger shadow copies of local variables.This option is only useful for testing the compiler.")
128128
public static let disableDeserializationRecovery: Option = Option("-disable-deserialization-recovery", .flag, attributes: [.helpHidden, .frontend, .noDriver], helpText: "Don't attempt to recover from missing xrefs (etc) in swiftmodules")
129129
public static let disableDiagnosticPasses: Option = Option("-disable-diagnostic-passes", .flag, attributes: [.helpHidden, .frontend, .noDriver], helpText: "Don't run diagnostic passes")
130-
public static let disableEmitGenericClassRoTList: Option = Option("-disable-emit-generic-class-ro_t-list", .flag, attributes: [.helpHidden, .frontend, .noDriver], helpText: "Disable emission of a section with references to class_ro_t of generic class patterns")
131130
public static let disableExperimentalClangImporterDiagnostics: Option = Option("-disable-experimental-clang-importer-diagnostics", .flag, attributes: [.helpHidden, .frontend, .noDriver, .moduleInterface], helpText: "Disable experimental diagnostics when importing C, C++, and Objective-C libraries")
132131
public static let disableExperimentalOpenedExistentialTypes: Option = Option("-disable-experimental-opened-existential-types", .flag, attributes: [.helpHidden, .frontend, .noDriver], helpText: "Disable experimental support for implicitly opened existentials")
133132
public static let disableExperimentalStringProcessing: Option = Option("-disable-experimental-string-processing", .flag, attributes: [.helpHidden, .frontend, .noDriver], helpText: "Disable experimental string processing")
@@ -149,7 +148,6 @@ extension Option {
149148
public static let disableMigratorFixits: Option = Option("-disable-migrator-fixits", .flag, attributes: [.frontend, .noInteractive], helpText: "Disable the Migrator phase which automatically applies fix-its")
150149
public static let disableModulesValidateSystemHeaders: Option = Option("-disable-modules-validate-system-headers", .flag, attributes: [.helpHidden, .frontend, .noDriver], helpText: "Disable validating system headers in the Clang importer")
151150
public static let disableNamedLazyMemberLoading: Option = Option("-disable-named-lazy-member-loading", .flag, attributes: [.helpHidden, .frontend, .noDriver], helpText: "Disable per-name lazy member loading")
152-
public static let disableNewLlvmPassManager: Option = Option("-disable-new-llvm-pass-manager", .flag, attributes: [.helpHidden, .frontend, .noDriver], helpText: "Disable the new llvm pass manager")
153151
public static let disableNewOperatorLookup: Option = Option("-disable-new-operator-lookup", .flag, attributes: [.helpHidden, .frontend, .noDriver], helpText: "Disable the new operator decl and precedencegroup lookup behavior")
154152
public static let disableNonfrozenEnumExhaustivityDiagnostics: Option = Option("-disable-nonfrozen-enum-exhaustivity-diagnostics", .flag, attributes: [.helpHidden, .frontend, .noDriver], helpText: "Allow switches over non-frozen enums without catch-all cases")
155153
public static let disableNskeyedarchiverDiagnostics: Option = Option("-disable-nskeyedarchiver-diagnostics", .flag, attributes: [.helpHidden, .frontend, .noDriver], helpText: "Allow classes with unstable mangled names to adopt NSCoding")
@@ -302,7 +300,6 @@ extension Option {
302300
public static let enableDeserializationRecovery: Option = Option("-enable-deserialization-recovery", .flag, attributes: [.helpHidden, .frontend, .noDriver], helpText: "Attempt to recover from missing xrefs (etc) in swiftmodules")
303301
public static let enableDestroyHoisting: Option = Option("-enable-destroy-hoisting=", .joined, attributes: [.helpHidden, .frontend, .noDriver], metaVar: "true|false", helpText: "Whether to enable destroy hoisting")
304302
public static let enableDynamicReplacementChaining: Option = Option("-enable-dynamic-replacement-chaining", .flag, attributes: [.helpHidden, .frontend, .noDriver], helpText: "Enable chaining of dynamic replacements")
305-
public static let enableEmitGenericClassRoTList: Option = Option("-enable-emit-generic-class-ro_t-list", .flag, attributes: [.helpHidden, .frontend, .noDriver], helpText: "Enable emission of a section with references to class_ro_t of generic class patterns")
306303
public static let enableExperimentalAdditiveArithmeticDerivation: Option = Option("-enable-experimental-additive-arithmetic-derivation", .flag, attributes: [.frontend], helpText: "Enable experimental 'AdditiveArithmetic' derived conformances")
307304
public static let enableExperimentalAssociatedTypeInference: Option = Option("-enable-experimental-associated-type-inference", .flag, attributes: [.helpHidden, .frontend, .noDriver], helpText: "Enable experimental associated type inference via type witness systems")
308305
public static let enableExperimentalAsyncTopLevel: Option = Option("-enable-experimental-async-top-level", .flag, attributes: [.helpHidden, .frontend, .noDriver, .moduleInterface], helpText: "Enable experimental concurrency in top-level code")
@@ -334,7 +331,7 @@ extension Option {
334331
public static let enableLlvmValueNames: Option = Option("-enable-llvm-value-names", .flag, attributes: [.helpHidden, .frontend, .noDriver], helpText: "Add names to local values in LLVM IR")
335332
public static let enableLlvmVfe: Option = Option("-enable-llvm-vfe", .flag, attributes: [.helpHidden, .frontend, .noDriver], helpText: "Use LLVM IR Virtual Function Elimination on Swift class virtual tables")
336333
public static let enableLlvmWme: Option = Option("-enable-llvm-wme", .flag, attributes: [.helpHidden, .frontend, .noDriver], helpText: "Use LLVM IR Witness Method Elimination on Swift protocol witness tables")
337-
public static let enableNewLlvmPassManager: Option = Option("-enable-new-llvm-pass-manager", .flag, attributes: [.helpHidden, .frontend, .noDriver], helpText: "Enable the new llvm pass manager")
334+
public static let enableNewLlvmPassManager: Option = Option("-enable-new-llvm-pass-manager", .flag, attributes: [.helpHidden, .frontend, .noDriver], helpText: "Enable new llvm pass manager")
338335
public static let enableNewOperatorLookup: Option = Option("-enable-new-operator-lookup", .flag, attributes: [.helpHidden, .frontend, .noDriver], helpText: "Enable the new operator decl and precedencegroup lookup behavior")
339336
public static let enableNonfrozenEnumExhaustivityDiagnostics: Option = Option("-enable-nonfrozen-enum-exhaustivity-diagnostics", .flag, attributes: [.helpHidden, .frontend, .noDriver], helpText: "Diagnose switches over non-frozen enums without catch-all cases")
340337
public static let enableNskeyedarchiverDiagnostics: Option = Option("-enable-nskeyedarchiver-diagnostics", .flag, attributes: [.helpHidden, .frontend, .noDriver], helpText: "Diagnose classes with unstable mangled names adopting NSCoding")
@@ -410,7 +407,6 @@ extension Option {
410407
public static let IEQ: Option = Option("-I=", .joined, alias: Option.I, attributes: [.frontend, .argumentIsPath])
411408
public static let iframework: Option = Option("-iframework", .joinedOrSeparate, attributes: [.noDriver, .argumentIsPath], helpText: "add a directory to the clang importer system framework search path")
412409
public static let ignoreAlwaysInline: Option = Option("-ignore-always-inline", .flag, attributes: [.helpHidden, .frontend, .noDriver], helpText: "Ignore @inline(__always) attributes.")
413-
public static let ignoreInterfaceProvidedOptions: Option = Option("-ignore-interface-provided-options", .flag, attributes: [.helpHidden, .frontend, .noDriver], helpText: "Ignore all module flags specified in the swiftinterface being built")
414410
public static let ignoreModuleSourceInfo: Option = Option("-ignore-module-source-info", .flag, attributes: [.frontend, .noDriver], helpText: "Avoid getting source location from .swiftsourceinfo files")
415411
public static let ignoreSpiGroups: Option = Option("-ignore-spi-group", .separate, attributes: [.noDriver], helpText: "SPI group name to not diagnose about")
416412
public static let ignoreSpiGroups_: Option = Option("--ignore-spi-group", .separate, alias: Option.ignoreSpiGroups, attributes: [.noDriver], helpText: "SPI group name to not diagnose about")
@@ -685,7 +681,6 @@ extension Option {
685681
public static let warnSwift3ObjcInferenceMinimal: Option = Option("-warn-swift3-objc-inference-minimal", .flag, attributes: [.frontend, .doesNotAffectIncrementalBuild], helpText: "Warn about deprecated @objc inference in Swift 3 based on direct uses of the Objective-C entrypoint")
686682
public static let warnSwift3ObjcInference: Option = Option("-warn-swift3-objc-inference", .flag, alias: Option.warnSwift3ObjcInferenceComplete, attributes: [.helpHidden, .frontend, .doesNotAffectIncrementalBuild])
687683
public static let warningsAsErrors: Option = Option("-warnings-as-errors", .flag, attributes: [.frontend], helpText: "Treat warnings as errors")
688-
public static let weakLinkAtTarget: Option = Option("-weak-link-at-target", .flag, attributes: [.helpHidden, .frontend, .noDriver], helpText: "Weakly link symbols for declarations that were introduced at the deployment target. Symbols introduced before the deployment target are still strongly linked.")
689684
public static let wholeModuleOptimization: Option = Option("-whole-module-optimization", .flag, attributes: [.frontend, .noInteractive], helpText: "Optimize input files together instead of individually")
690685
public static let wmo: Option = Option("-wmo", .flag, alias: Option.wholeModuleOptimization, attributes: [.helpHidden, .frontend, .noInteractive])
691686
public static let workingDirectoryEQ: Option = Option("-working-directory=", .joined, alias: Option.workingDirectory)
@@ -817,7 +812,6 @@ extension Option {
817812
Option.disableDebuggerShadowCopies,
818813
Option.disableDeserializationRecovery,
819814
Option.disableDiagnosticPasses,
820-
Option.disableEmitGenericClassRoTList,
821815
Option.disableExperimentalClangImporterDiagnostics,
822816
Option.disableExperimentalOpenedExistentialTypes,
823817
Option.disableExperimentalStringProcessing,
@@ -839,7 +833,6 @@ extension Option {
839833
Option.disableMigratorFixits,
840834
Option.disableModulesValidateSystemHeaders,
841835
Option.disableNamedLazyMemberLoading,
842-
Option.disableNewLlvmPassManager,
843836
Option.disableNewOperatorLookup,
844837
Option.disableNonfrozenEnumExhaustivityDiagnostics,
845838
Option.disableNskeyedarchiverDiagnostics,
@@ -992,7 +985,6 @@ extension Option {
992985
Option.enableDeserializationRecovery,
993986
Option.enableDestroyHoisting,
994987
Option.enableDynamicReplacementChaining,
995-
Option.enableEmitGenericClassRoTList,
996988
Option.enableExperimentalAdditiveArithmeticDerivation,
997989
Option.enableExperimentalAssociatedTypeInference,
998990
Option.enableExperimentalAsyncTopLevel,
@@ -1100,7 +1092,6 @@ extension Option {
11001092
Option.IEQ,
11011093
Option.iframework,
11021094
Option.ignoreAlwaysInline,
1103-
Option.ignoreInterfaceProvidedOptions,
11041095
Option.ignoreModuleSourceInfo,
11051096
Option.ignoreSpiGroups,
11061097
Option.ignoreSpiGroups_,
@@ -1375,7 +1366,6 @@ extension Option {
13751366
Option.warnSwift3ObjcInferenceMinimal,
13761367
Option.warnSwift3ObjcInference,
13771368
Option.warningsAsErrors,
1378-
Option.weakLinkAtTarget,
13791369
Option.wholeModuleOptimization,
13801370
Option.wmo,
13811371
Option.workingDirectoryEQ,

0 commit comments

Comments
 (0)