Skip to content

Commit 394c5bb

Browse files
committed
PrebuiltModuleGen: create absent module cache directory
rdar://103157454
1 parent 38c9387 commit 394c5bb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Sources/swift-build-sdk-interfaces/main.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,11 @@ do {
148148
if let mcp = getArgument(mcpFlag) {
149149
args.append(mcpFlag)
150150
args.append(mcp)
151+
// Create module cache dir if absent.
152+
let mcpPath = try VirtualPath(path: mcp).absolutePath!
153+
if !localFileSystem.exists(mcpPath) {
154+
try localFileSystem.createDirectory(mcpPath, recursive: true)
155+
}
151156
}
152157
let baselineABIDir = try getArgumentAsPath("-baseline-abi-dir")
153158
var driver = try Driver(args: args,

0 commit comments

Comments
 (0)