Skip to content

Commit 30af8c4

Browse files
Merge pull request #678 from varungandhi-apple/vg-update-makeOptions
Update makeOptions and SwiftOptions.
2 parents 45f913d + 8b52241 commit 30af8c4

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

Sources/SwiftOptions/Options.swift

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ extension Option {
3131
public static let avoidLocation_: Option = Option("--avoid-location", .flag, alias: Option.avoidLocation, attributes: [.noDriver], helpText: "Avoid serializing the file paths of SDK nodes.")
3232
public static let avoidToolArgs: Option = Option("-avoid-tool-args", .flag, attributes: [.noDriver], helpText: "Avoid serializing the arguments for invoking the tool.")
3333
public static let avoidToolArgs_: Option = Option("--avoid-tool-args", .flag, alias: Option.avoidToolArgs, attributes: [.noDriver], helpText: "Avoid serializing the arguments for invoking the tool.")
34+
public static let backupModuleInterfacePathEQ: Option = Option("-backup-module-interface-path=", .joined, alias: Option.backupModuleInterfacePath, attributes: [.helpHidden, .frontend, .noDriver])
35+
public static let backupModuleInterfacePath: Option = Option("-backup-module-interface-path", .separate, attributes: [.helpHidden, .frontend, .noDriver], helpText: "Directory of module interfaces as backups to those from SDKs")
3436
public static let badFileDescriptorRetryCount: Option = Option("-bad-file-descriptor-retry-count", .separate, attributes: [.helpHidden, .frontend, .noDriver], helpText: "Number of retrying opening a file if previous open returns a bad file descriptor error.")
3537
public static let baselineDir: Option = Option("-baseline-dir", .joinedOrSeparate, attributes: [.noDriver, .argumentIsPath], helpText: "The path to a directory containing baseline files: macos.json, iphoneos.json, appletvos.json, watchos.json, and iosmac.json")
3638
public static let baselinePath: Option = Option("-baseline-path", .joinedOrSeparate, attributes: [.noDriver, .argumentIsPath], helpText: "The path to the Json file that we should use as the baseline")
@@ -259,7 +261,6 @@ extension Option {
259261
public static let enableDeserializationRecovery: Option = Option("-enable-deserialization-recovery", .flag, attributes: [.helpHidden, .frontend, .noDriver], helpText: "Attempt to recover from missing xrefs (etc) in swiftmodules")
260262
public static let enableDynamicReplacementChaining: Option = Option("-enable-dynamic-replacement-chaining", .flag, attributes: [.helpHidden, .frontend, .noDriver], helpText: "Enable chaining of dynamic replacements")
261263
public static let enableExperimentalAdditiveArithmeticDerivation: Option = Option("-enable-experimental-additive-arithmetic-derivation", .flag, attributes: [.frontend], helpText: "Enable experimental 'AdditiveArithmetic' derived conformances")
262-
public static let enableExperimentalAsyncHandler: Option = Option("-enable-experimental-async-handler", .flag, attributes: [.helpHidden, .frontend, .noDriver, .moduleInterface], helpText: "Enable experimental @asyncHandler feature")
263264
public static let enableExperimentalConcisePoundFile: Option = Option("-enable-experimental-concise-pound-file", .flag, attributes: [.frontend, .moduleInterface], helpText: "Enable experimental concise '#file' identifier")
264265
public static let enableExperimentalConcurrency: Option = Option("-enable-experimental-concurrency", .flag, attributes: [.helpHidden, .frontend, .noDriver, .moduleInterface], helpText: "Enable experimental concurrency model")
265266
public static let enableExperimentalCxxInterop: Option = Option("-enable-experimental-cxx-interop", .flag, helpText: "Allow importing C++ modules into Swift (experimental feature)")
@@ -287,7 +288,6 @@ extension Option {
287288
public static let enableSourceImport: Option = Option("-enable-source-import", .flag, attributes: [.helpHidden, .frontend, .noDriver], helpText: "Enable importing of Swift source files")
288289
public static let enableSpecDevirt: Option = Option("-enable-spec-devirt", .flag, attributes: [.helpHidden, .frontend, .noDriver], helpText: "Enable speculative devirtualization pass.")
289290
public static let enableSwift3ObjcInference: Option = Option("-enable-swift3-objc-inference", .flag, attributes: [.helpHidden, .frontend, .noDriver], helpText: "Enable Swift 3's @objc inference rules for NSObject-derived classes and 'dynamic' members (emulates Swift 3 behavior)")
290-
public static let enableSwiftcall: Option = Option("-enable-swiftcall", .flag, attributes: [.frontend, .noDriver], helpText: "Enable the use of LLVM swiftcall support")
291291
public static let enableTargetOsChecking: Option = Option("-enable-target-os-checking", .flag, attributes: [.frontend, .noDriver], helpText: "Enable checking the target OS of serialized modules")
292292
public static let enableTestableAttrRequiresTestableModule: Option = Option("-enable-testable-attr-requires-testable-module", .flag, attributes: [.frontend, .noDriver], helpText: "Enable checking of @testable")
293293
public static let enableTesting: Option = Option("-enable-testing", .flag, attributes: [.helpHidden, .frontend, .noInteractive], helpText: "Allows this module's internal API to be accessed for testing")
@@ -457,6 +457,8 @@ extension Option {
457457
public static let profileUse: Option = Option("-profile-use=", .commaJoined, attributes: [.frontend, .noInteractive, .argumentIsPath], metaVar: "<profdata>", helpText: "Supply a profdata file to enable profile-guided optimization")
458458
public static let protocolRequirementAllowList: Option = Option("-protocol-requirement-allow-list", .separate, attributes: [.noDriver, .argumentIsPath], metaVar: "<path>", helpText: "File containing a new-line separated list of protocol names")
459459
public static let protocolRequirementAllowList_: Option = Option("--protocol-requirement-allow-list", .separate, alias: Option.protocolRequirementAllowList, attributes: [.noDriver, .argumentIsPath], metaVar: "<path>", helpText: "File containing a new-line separated list of protocol names")
460+
public static let RaccessNoteEQ: Option = Option("-Raccess-note=", .joined, alias: Option.RaccessNote, attributes: [.frontend, .noDriver])
461+
public static let RaccessNote: Option = Option("-Raccess-note", .separate, attributes: [.frontend, .noDriver], metaVar: "none|failures|all|all-validate", helpText: "Control access note remarks (default: all)")
460462
public static let emitCrossImportRemarks: Option = Option("-Rcross-import", .flag, attributes: [.frontend, .doesNotAffectIncrementalBuild], helpText: "Emit a remark if a cross-import of a module is triggered.")
461463
public static let readLegacyTypeInfoPathEQ: Option = Option("-read-legacy-type-info-path=", .joined, attributes: [.helpHidden, .frontend, .noDriver], helpText: "Read legacy type layout from the given path instead of default path")
462464
public static let RemoveRuntimeAsserts: Option = Option("-remove-runtime-asserts", .flag, attributes: [.frontend], helpText: "Remove runtime safety checks.")
@@ -549,7 +551,7 @@ extension Option {
549551
public static let useMalloc: Option = Option("-use-malloc", .flag, attributes: [.helpHidden, .frontend, .noDriver], helpText: "Allocate internal data structures using malloc (for memory debugging)")
550552
public static let useStaticResourceDir: Option = Option("-use-static-resource-dir", .flag, attributes: [.helpHidden, .frontend, .noDriver], helpText: "Use resources in the static resource directory")
551553
public static let useTabs: Option = Option("-use-tabs", .flag, attributes: [.noInteractive, .noBatch, .indent], helpText: "Use tabs for indentation.", group: .codeFormatting)
552-
public static let userModuleVersion: Option = Option("-user-module-version", .separate, attributes: [.frontend, .moduleInterface], metaVar: "<vers>", helpText: "Module version specified from Swift module authors")
554+
public static let userModuleVersion: Option = Option("-user-module-version", .separate, attributes: [.frontend], metaVar: "<vers>", helpText: "Module version specified from Swift module authors")
553555
public static let validateTbdAgainstIrEQ: Option = Option("-validate-tbd-against-ir=", .joined, attributes: [.helpHidden, .frontend, .noDriver], metaVar: "<level>", helpText: "Compare the symbols in the IR against the TBD file that would be generated.")
554556
public static let valueRecursionThreshold: Option = Option("-value-recursion-threshold", .separate, attributes: [.helpHidden, .frontend, .doesNotAffectIncrementalBuild], helpText: "Set the maximum depth for direct recursion in value types")
555557
public static let verifyAdditionalFile: Option = Option("-verify-additional-file", .separate, attributes: [.frontend, .noDriver], helpText: "Verify diagnostics in this file in addition to source files")
@@ -613,6 +615,8 @@ extension Option {
613615
Option.avoidLocation_,
614616
Option.avoidToolArgs,
615617
Option.avoidToolArgs_,
618+
Option.backupModuleInterfacePathEQ,
619+
Option.backupModuleInterfacePath,
616620
Option.badFileDescriptorRetryCount,
617621
Option.baselineDir,
618622
Option.baselinePath,
@@ -841,7 +845,6 @@ extension Option {
841845
Option.enableDeserializationRecovery,
842846
Option.enableDynamicReplacementChaining,
843847
Option.enableExperimentalAdditiveArithmeticDerivation,
844-
Option.enableExperimentalAsyncHandler,
845848
Option.enableExperimentalConcisePoundFile,
846849
Option.enableExperimentalConcurrency,
847850
Option.enableExperimentalCxxInterop,
@@ -869,7 +872,6 @@ extension Option {
869872
Option.enableSourceImport,
870873
Option.enableSpecDevirt,
871874
Option.enableSwift3ObjcInference,
872-
Option.enableSwiftcall,
873875
Option.enableTargetOsChecking,
874876
Option.enableTestableAttrRequiresTestableModule,
875877
Option.enableTesting,
@@ -1039,6 +1041,8 @@ extension Option {
10391041
Option.profileUse,
10401042
Option.protocolRequirementAllowList,
10411043
Option.protocolRequirementAllowList_,
1044+
Option.RaccessNoteEQ,
1045+
Option.RaccessNote,
10421046
Option.emitCrossImportRemarks,
10431047
Option.readLegacyTypeInfoPathEQ,
10441048
Option.RemoveRuntimeAsserts,

Sources/makeOptions/makeOptions.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ enum SwiftFlags {
6363
SwiftSymbolGraphExtractOption = (1 << 16),
6464
SwiftAPIDigesterOption = (1 << 17),
6565
NewDriverOnlyOption = (1 << 18),
66+
ModuleInterfaceOptionIgnorable = (1 << 19),
6667
};
6768

6869
static std::set<std::string> swiftKeywords = { "internal", "static" };

0 commit comments

Comments
 (0)