Skip to content
Merged
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
14 changes: 8 additions & 6 deletions tools/swiftc_stub/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,14 @@ func touchDepsFiles(isWMO: Bool, paths: [PathKey: URL]) throws {
guard let outputFileMapPath = paths[PathKey.outputFileMap] else { return }

if isWMO {
let dPath = String(
outputFileMapPath.path.dropLast("-OutputFileMap.json".count) +
"-master.d"
)
var url = URL(fileURLWithPath: dPath)
try url.touch()
// Xcode 26 beta 3 changed the naming convention for .d files of WMO modules to
// use a suffix of "-primary" instead of "-master". Support both for now.
let basePath = outputFileMapPath.path.dropLast("-OutputFileMap.json".count)
for suffix in ["-master", "-primary"] {
let dPath = "\(basePath)\(suffix).d"
var url = URL(fileURLWithPath: dPath)
try url.touch()
}
} else {
let data = try Data(contentsOf: outputFileMapPath)
let outputFileMapRaw = try JSONSerialization.jsonObject(
Expand Down