Skip to content

Commit a598bd8

Browse files
authored
Merge pull request #500 from beccadax/i-have-some-notes-for-you
Add support for symbol graphs and access notes
2 parents 2aa1edf + cdc3dc5 commit a598bd8

File tree

5 files changed

+36
-30
lines changed

5 files changed

+36
-30
lines changed

Sources/SwiftDriver/Jobs/CompileJob.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,11 @@ extension Driver {
291291
try commandLine.appendLast(.runtimeCompatibilityVersion, from: &parsedOptions)
292292
try commandLine.appendLast(.disableAutolinkingRuntimeCompatibilityDynamicReplacements, from: &parsedOptions)
293293

294+
if compilerMode.isSingleCompilation {
295+
try commandLine.appendLast(.emitSymbolGraph, from: &parsedOptions)
296+
try commandLine.appendLast(.emitSymbolGraphDir, from: &parsedOptions)
297+
}
298+
294299
addJobOutputs(outputs)
295300

296301
// If we're prioritizing the emit module job, schedule the compile jobs

Sources/SwiftDriver/Jobs/FrontendJobHelpers.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ extension Driver {
172172
try commandLine.appendLast(.requireExplicitAvailability, from: &parsedOptions)
173173
try commandLine.appendLast(.requireExplicitAvailabilityTarget, from: &parsedOptions)
174174
try commandLine.appendLast(.lto, from: &parsedOptions)
175+
try commandLine.appendLast(.accessNotesPath, from: &parsedOptions)
175176
try commandLine.appendAll(.D, from: &parsedOptions)
176177
try commandLine.appendAll(.sanitizeEQ, from: &parsedOptions)
177178
try commandLine.appendAll(.debugPrefixMap, from: &parsedOptions)

Sources/SwiftDriver/Jobs/MergeModuleJob.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ extension Driver {
5858

5959
addCommonModuleOptions(commandLine: &commandLine, outputs: &outputs, isMergeModule: true)
6060

61+
try commandLine.appendLast(.emitSymbolGraph, from: &parsedOptions)
62+
try commandLine.appendLast(.emitSymbolGraphDir, from: &parsedOptions)
63+
6164
// Propagate cross-module incremental builds flag so dependency information
6265
// shows up in swiftmodules.
6366
try commandLine.appendLast(.enableExperimentalCrossModuleIncrementalBuild, from: &parsedOptions)

0 commit comments

Comments
 (0)