Skip to content
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
6 changes: 5 additions & 1 deletion Sources/SwiftDriver/Jobs/EmitModuleJob.swift
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ extension Driver {

addCommonModuleOptions(commandLine: &commandLine, outputs: &outputs, isMergeModule: false)

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

if parsedOptions.hasArgument(.parseAsLibrary, .emitLibrary) {
commandLine.appendFlag(.parseAsLibrary)
}
Expand All @@ -102,6 +105,7 @@ extension Driver {
var shouldCreateEmitModuleJob: Bool {
mutating get {
return moduleOutputInfo.output != nil
&& inputFiles.allSatisfy() { $0.type.isPartOfSwiftCompilation } // Ignore calls for linking.
&& (forceEmitModuleBeforeCompile
|| shouldEmitModuleSeparately())
}
Expand All @@ -111,7 +115,7 @@ extension Driver {
mutating func shouldEmitModuleSeparately() -> Bool {
return parsedOptions.hasFlag(positive: .emitModuleSeparately,
negative: .noEmitModuleSeparately,
default: false)
default: true)
&& !parsedOptions.hasFlag(positive: .wholeModuleOptimization,
negative: .noWholeModuleOptimization,
default: false)
Expand Down
Loading