mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[xcodegen] Allow swift-plugin-server to be added
Previously we would avoid adding this since it has an invalid module name, but we can follow the same logic as the driver and set the module name to `main`.
This commit is contained in:
@@ -557,8 +557,10 @@ fileprivate final class ProjectGenerator {
|
||||
|
||||
applySubstitutions(to: &buildArgs, target: target, targetInfo: targetInfo)
|
||||
|
||||
// Follow the same logic as swift-driver and set the module name to 'main'
|
||||
// if we don't have one.
|
||||
let moduleName = buildArgs.takePrintedLastValue(for: .moduleName)
|
||||
buildSettings.common.PRODUCT_MODULE_NAME = moduleName
|
||||
buildSettings.common.PRODUCT_MODULE_NAME = moduleName ?? "main"
|
||||
|
||||
// Emit a module if we need to.
|
||||
// TODO: This currently just uses the build rule command args, should we
|
||||
|
||||
Reference in New Issue
Block a user