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
12 changes: 12 additions & 0 deletions Sources/swift-build-sdk-interfaces/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,18 @@ do {
try localFileSystem.createDirectory(mcpPath, recursive: true)
}
}

// When building modules for an SDK, ignore any existing prebuilt modules.
// modules. Do so by passing an intentially-bad path for the prebuilt
// module cache path that's derived from the output path (but not the same
// as that path). This prohibits the frontend scanning job from adding the
// default prebuilt module cache path, while ensuring that we find no
// prebuilt modules during this scan.
args.append("-Xfrontend")
args.append("-prebuilt-module-cache-path")
args.append("-Xfrontend")
args.append(outputDir.appending(component: "__nonexistent__").pathString)

let baselineABIDir = try getArgumentAsPath("-baseline-abi-dir")
var driver = try Driver(args: args,
diagnosticsOutput: .engine(diagnosticsEngine),
Expand Down