mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
ModuleInterface: allow blocklist to configure module names from SDKs that we use textual interfaces exclusively
This commit is contained in:
@@ -236,6 +236,7 @@ struct ModuleRebuildInfo {
|
||||
PublicFramework,
|
||||
InterfacePreferred,
|
||||
CompilerHostModule,
|
||||
Blocklisted,
|
||||
};
|
||||
struct CandidateModule {
|
||||
std::string path;
|
||||
@@ -758,6 +759,14 @@ class ModuleInterfaceLoaderImpl {
|
||||
// Should we attempt to load a swiftmodule adjacent to the swiftinterface?
|
||||
bool shouldLoadAdjacentModule = !ctx.IgnoreAdjacentModules;
|
||||
|
||||
if (modulePath.contains(".sdk")) {
|
||||
if (ctx.blockListConfig.hasBlockListAction(moduleName,
|
||||
BlockListKeyKind::ModuleName, BlockListAction::ShouldUseTextualModule)) {
|
||||
shouldLoadAdjacentModule = false;
|
||||
rebuildInfo.addIgnoredModule(modulePath, ReasonIgnored::Blocklisted);
|
||||
}
|
||||
}
|
||||
|
||||
// Don't use the adjacent swiftmodule for frameworks from the public
|
||||
// Frameworks folder of the SDK.
|
||||
if (isInSystemFrameworks(modulePath, /*publicFramework*/true)) {
|
||||
|
||||
Reference in New Issue
Block a user