Skip to content

Commit 0c7aec6

Browse files
update symbol graph emission flags
1 parent f9821a1 commit 0c7aec6

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

Sources/SwiftDriver/Jobs/CompileJob.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,8 @@ extension Driver {
354354
try commandLine.appendLast(.emitSymbolGraph, from: &parsedOptions)
355355
try commandLine.appendLast(.emitSymbolGraphDir, from: &parsedOptions)
356356
}
357+
try commandLine.appendLast(.includeSpiSymbols, from: &parsedOptions)
358+
try commandLine.appendLast(.symbolGraphMinimumAccessLevel, from: &parsedOptions)
357359

358360
addJobOutputs(outputs)
359361

Sources/SwiftDriver/Jobs/EmitModuleJob.swift

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

8585
try commandLine.appendLast(.emitSymbolGraph, from: &parsedOptions)
8686
try commandLine.appendLast(.emitSymbolGraphDir, from: &parsedOptions)
87+
try commandLine.appendLast(.includeSpiSymbols, from: &parsedOptions)
88+
try commandLine.appendLast(.symbolGraphMinimumAccessLevel, from: &parsedOptions)
8789
try commandLine.appendLast(.checkApiAvailabilityOnly, from: &parsedOptions)
8890

8991
if parsedOptions.hasArgument(.parseAsLibrary, .emitLibrary) {

Sources/SwiftDriver/Jobs/MergeModuleJob.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ extension Driver {
6161

6262
try commandLine.appendLast(.emitSymbolGraph, from: &parsedOptions)
6363
try commandLine.appendLast(.emitSymbolGraphDir, from: &parsedOptions)
64+
try commandLine.appendLast(.includeSpiSymbols, from: &parsedOptions)
65+
try commandLine.appendLast(.symbolGraphMinimumAccessLevel, from: &parsedOptions)
6466

6567
// Propagate the disable flag for cross-module incremental builds
6668
// if necessary. Note because we're interested in *disabling* this feature,

Sources/SwiftOptions/Options.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,7 @@ extension Option {
554554
public static let swiftOnly_: Option = Option("--swift-only", .flag, alias: Option.swiftOnly, attributes: [.noDriver], helpText: "Only include APIs defined from Swift source")
555555
public static let swiftVersion: Option = Option("-swift-version", .separate, attributes: [.frontend, .moduleInterface], metaVar: "<vers>", helpText: "Interpret input according to a specific Swift language version number")
556556
public static let switchCheckingInvocationThresholdEQ: Option = Option("-switch-checking-invocation-threshold=", .joined, attributes: [.helpHidden, .frontend, .noDriver])
557+
public static let symbolGraphMinimumAccessLevel: Option = Option("-symbol-graph-minimum-access-level", .separate, attributes: [.helpHidden, .frontend, .noInteractive, .supplementaryOutput], metaVar: "<level>", helpText: "Include symbols with this access level or more when emitting a symbol graph")
557558
public static let S: Option = Option("-S", .flag, alias: Option.emitAssembly, attributes: [.frontend, .noInteractive], group: .modes)
558559
public static let tabWidth: Option = Option("-tab-width", .separate, attributes: [.noInteractive, .noBatch, .indent], metaVar: "<n>", helpText: "Width of tab character.", group: .codeFormatting)
559560
public static let targetCpu: Option = Option("-target-cpu", .separate, attributes: [.frontend, .moduleInterface], helpText: "Generate code for a particular CPU variant")
@@ -1179,6 +1180,7 @@ extension Option {
11791180
Option.swiftOnly_,
11801181
Option.swiftVersion,
11811182
Option.switchCheckingInvocationThresholdEQ,
1183+
Option.symbolGraphMinimumAccessLevel,
11821184
Option.S,
11831185
Option.tabWidth,
11841186
Option.targetCpu,

0 commit comments

Comments
 (0)