Skip to content

update symbol graph emission flags #890

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Sources/SwiftDriver/Jobs/CompileJob.swift
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,8 @@ extension Driver {
try commandLine.appendLast(.emitSymbolGraph, from: &parsedOptions)
try commandLine.appendLast(.emitSymbolGraphDir, from: &parsedOptions)
}
try commandLine.appendLast(.includeSpiSymbols, from: &parsedOptions)
try commandLine.appendLast(.symbolGraphMinimumAccessLevel, from: &parsedOptions)

addJobOutputs(outputs)

Expand Down
2 changes: 2 additions & 0 deletions Sources/SwiftDriver/Jobs/EmitModuleJob.swift
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ extension Driver {

try commandLine.appendLast(.emitSymbolGraph, from: &parsedOptions)
try commandLine.appendLast(.emitSymbolGraphDir, from: &parsedOptions)
try commandLine.appendLast(.includeSpiSymbols, from: &parsedOptions)
try commandLine.appendLast(.symbolGraphMinimumAccessLevel, from: &parsedOptions)
try commandLine.appendLast(.checkApiAvailabilityOnly, from: &parsedOptions)

if parsedOptions.hasArgument(.parseAsLibrary, .emitLibrary) {
Expand Down
2 changes: 2 additions & 0 deletions Sources/SwiftDriver/Jobs/MergeModuleJob.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ extension Driver {

try commandLine.appendLast(.emitSymbolGraph, from: &parsedOptions)
try commandLine.appendLast(.emitSymbolGraphDir, from: &parsedOptions)
try commandLine.appendLast(.includeSpiSymbols, from: &parsedOptions)
try commandLine.appendLast(.symbolGraphMinimumAccessLevel, from: &parsedOptions)

// Propagate the disable flag for cross-module incremental builds
// if necessary. Note because we're interested in *disabling* this feature,
Expand Down
2 changes: 2 additions & 0 deletions Sources/SwiftOptions/Options.swift
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,7 @@ extension Option {
public static let swiftOnly_: Option = Option("--swift-only", .flag, alias: Option.swiftOnly, attributes: [.noDriver], helpText: "Only include APIs defined from Swift source")
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")
public static let switchCheckingInvocationThresholdEQ: Option = Option("-switch-checking-invocation-threshold=", .joined, attributes: [.helpHidden, .frontend, .noDriver])
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")
public static let S: Option = Option("-S", .flag, alias: Option.emitAssembly, attributes: [.frontend, .noInteractive], group: .modes)
public static let tabWidth: Option = Option("-tab-width", .separate, attributes: [.noInteractive, .noBatch, .indent], metaVar: "<n>", helpText: "Width of tab character.", group: .codeFormatting)
public static let targetCpu: Option = Option("-target-cpu", .separate, attributes: [.frontend, .moduleInterface], helpText: "Generate code for a particular CPU variant")
Expand Down Expand Up @@ -1179,6 +1180,7 @@ extension Option {
Option.swiftOnly_,
Option.swiftVersion,
Option.switchCheckingInvocationThresholdEQ,
Option.symbolGraphMinimumAccessLevel,
Option.S,
Option.tabWidth,
Option.targetCpu,
Expand Down