@@ -836,12 +836,20 @@ class ModuleInterfaceLoaderImpl {
836836
837837 // Don't use the adjacent swiftmodule for frameworks from the public
838838 // Frameworks folder of the SDK.
839- if (isInSystemFrameworks (modulePath, /* publicFramework*/ true ) ||
840- isInSystemSubFrameworks (modulePath)) {
839+ bool blocklistSwiftmodule =
840+ ctx.blockListConfig .hasBlockListAction (moduleName,
841+ BlockListKeyKind::ModuleName,
842+ BlockListAction::ShouldUseBinaryModule);
843+
844+ if ((isInSystemFrameworks (modulePath, /* publicFramework*/ true ) ||
845+ isInSystemSubFrameworks (modulePath)) &&
846+ !blocklistSwiftmodule) {
841847 shouldLoadAdjacentModule = false ;
842848 rebuildInfo.addIgnoredModule (modulePath,
843849 ReasonIgnored::PublicFramework);
844- } else if (isInSystemLibraries (modulePath) && moduleName != STDLIB_NAME) {
850+ } else if (isInSystemLibraries (modulePath) &&
851+ moduleName != STDLIB_NAME &&
852+ !blocklistSwiftmodule) {
845853 shouldLoadAdjacentModule = false ;
846854 rebuildInfo.addIgnoredModule (modulePath,
847855 ReasonIgnored::PublicLibrary);
0 commit comments