Skip to content

[PrebuiltModuleGen] Ensure the dependency scanner always ignores existing prebuilt modules #1651

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 8, 2024
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
13 changes: 13 additions & 0 deletions Sources/swift-build-sdk-interfaces/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,19 @@ do {
args.append("-Xfrontend")
args.append(outputDir.appending(component: "__nonexistent__").pathString)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We most-likely don't need this anymore, but I'd like to remove it in a follow-up change after we cherry-pick this onto the release branch.


// If the compiler/scanner supports it, instruct it to ignore any existing prebuilt
// modules for which a textual interface is discovered, ensuring that modules
// always build from interface when one is available.
if let supportedFlagsTestDriver = try? Driver(args: ["swiftc", "-v"],
executor: executor,
compilerExecutableDir: swiftcPath.parentDirectory),
supportedFlagsTestDriver.isFrontendArgSupported(.moduleLoadMode) {
args.append("-Xfrontend")
args.append("-module-load-mode")
args.append("-Xfrontend")
args.append("only-interface")
}

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