Skip to content

Commit 22bfd6b

Browse files
authored
Change extraManifestFlags to be additive (#3571)
This is more forward compatible with adding additional cases that also want to add extra manifest flags here.
1 parent 59fa60e commit 22bfd6b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Sources/Commands/SwiftTool.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -865,12 +865,10 @@ public class SwiftTool {
865865
cachePath = try self.getCachePath().map{ $0.appending(component: "manifests") }
866866
}
867867

868-
let extraManifestFlags: [String]
868+
var extraManifestFlags = self.options.manifestFlags
869869
// Disable the implicit concurrency import if the compiler in use supports it to avoid warnings if we are building against an older SDK that does not contain a Concurrency module.
870870
if SwiftTargetBuildDescription.checkSupportedFrontendFlags(flags: ["disable-implicit-concurrency-module-import"], fs: localFileSystem) {
871-
extraManifestFlags = self.options.manifestFlags + ["-Xfrontend", "-disable-implicit-concurrency-module-import"]
872-
} else {
873-
extraManifestFlags = self.options.manifestFlags
871+
extraManifestFlags += ["-Xfrontend", "-disable-implicit-concurrency-module-import"]
874872
}
875873

876874
return try ManifestLoader(

0 commit comments

Comments
 (0)