Frontend: Upstream blocklist check in ignoring adjacent swiftmodule files

This commit is contained in:
Alexis Laferrière
2025-03-18 11:48:15 -07:00
parent 2f30161563
commit 7d3ed787a1
2 changed files with 12 additions and 5 deletions

View File

@@ -836,12 +836,20 @@ class ModuleInterfaceLoaderImpl {
// Don't use the adjacent swiftmodule for frameworks from the public
// Frameworks folder of the SDK.
if (isInSystemFrameworks(modulePath, /*publicFramework*/true) ||
isInSystemSubFrameworks(modulePath)) {
bool blocklistSwiftmodule =
ctx.blockListConfig.hasBlockListAction(moduleName,
BlockListKeyKind::ModuleName,
BlockListAction::ShouldUseBinaryModule);
if ((isInSystemFrameworks(modulePath, /*publicFramework*/true) ||
isInSystemSubFrameworks(modulePath)) &&
!blocklistSwiftmodule) {
shouldLoadAdjacentModule = false;
rebuildInfo.addIgnoredModule(modulePath,
ReasonIgnored::PublicFramework);
} else if (isInSystemLibraries(modulePath) && moduleName != STDLIB_NAME) {
} else if (isInSystemLibraries(modulePath) &&
moduleName != STDLIB_NAME &&
!blocklistSwiftmodule) {
shouldLoadAdjacentModule = false;
rebuildInfo.addIgnoredModule(modulePath,
ReasonIgnored::PublicLibrary);