@@ -836,12 +836,20 @@ class ModuleInterfaceLoaderImpl {
836
836
837
837
// Don't use the adjacent swiftmodule for frameworks from the public
838
838
// 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) {
841
847
shouldLoadAdjacentModule = false ;
842
848
rebuildInfo.addIgnoredModule (modulePath,
843
849
ReasonIgnored::PublicFramework);
844
- } else if (isInSystemLibraries (modulePath) && moduleName != STDLIB_NAME) {
850
+ } else if (isInSystemLibraries (modulePath) &&
851
+ moduleName != STDLIB_NAME &&
852
+ !blocklistSwiftmodule) {
845
853
shouldLoadAdjacentModule = false ;
846
854
rebuildInfo.addIgnoredModule (modulePath,
847
855
ReasonIgnored::PublicLibrary);
0 commit comments