Skip to content

Commit 0cd0200

Browse files
committed
Add -package-name to driver
1 parent 65e0b28 commit 0cd0200

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

Sources/SwiftDriver/Jobs/FrontendJobHelpers.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ extension Driver {
157157
try commandLine.appendLast(.importUnderlyingModule, from: &parsedOptions)
158158
try commandLine.appendLast(.moduleCachePath, from: &parsedOptions)
159159
try commandLine.appendLast(.moduleLinkName, from: &parsedOptions)
160+
try commandLine.appendLast(.packageName, from: &parsedOptions)
160161
try commandLine.appendLast(.nostdimport, from: &parsedOptions)
161162
try commandLine.appendLast(.parseStdlib, from: &parsedOptions)
162163
try commandLine.appendLast(.solverMemoryThreshold, from: &parsedOptions)

Sources/SwiftOptions/Options.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,7 @@ extension Option {
509509
public static let moduleName: Option = Option("-module-name", .separate, attributes: [.frontend, .moduleInterface], helpText: "Name of the module to build")
510510
public static let module: Option = Option("-module", .separate, attributes: [.noDriver], metaVar: "<name>", helpText: "Names of modules")
511511
public static let module_: Option = Option("--module", .separate, alias: Option.module, attributes: [.noDriver], metaVar: "<name>", helpText: "Names of modules")
512+
public static let packageName: Option = Option("-package-name", .separate, attributes: [.frontend, .moduleInterface], helpText: "Name of the package containing to the main module")
512513
public static let newDriverPath: Option = Option("-new-driver-path", .separate, attributes: [.helpHidden, .frontend, .noDriver], metaVar: "<path>", helpText: "Path of the new driver to be used")
513514
public static let noClangModuleBreadcrumbs: Option = Option("-no-clang-module-breadcrumbs", .flag, attributes: [.helpHidden, .frontend, .noDriver], helpText: "Don't emit DWARF skeleton CUs for imported Clang modules. Use this when building a redistributable static archive.")
514515
public static let noColorDiagnostics: Option = Option("-no-color-diagnostics", .flag, attributes: [.frontend, .doesNotAffectIncrementalBuild], helpText: "Do not print diagnostics in color")
@@ -1275,6 +1276,7 @@ extension Option {
12751276
Option.O,
12761277
Option.o,
12771278
Option.packageDescriptionVersion,
1279+
Option.packageName,
12781280
Option.parseAsLibrary,
12791281
Option.parseSil,
12801282
Option.parseStdlib,

0 commit comments

Comments
 (0)