mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Introduce a package interface.
It has an extension .package.swiftinterface and contains package decls as well as SPIs and public/inlinable decls. When a module is loaded from interface, it now looks up the package-name in the interface and checks if the importer is in the same package. If so, it uses that package interface found to load the module. If not, uses the existing logic to load modules. Resolves rdar://104617854
This commit is contained in:
@@ -165,6 +165,15 @@ CompilerInvocation::getPrivateModuleInterfaceOutputPathForWholeModule() const {
|
||||
.SupplementaryOutputs.PrivateModuleInterfaceOutputPath;
|
||||
}
|
||||
|
||||
std::string
|
||||
CompilerInvocation::getPackageModuleInterfaceOutputPathForWholeModule() const {
|
||||
assert(getFrontendOptions().InputsAndOutputs.isWholeModule() &&
|
||||
"PackageModuleInterfaceOutputPath only makes sense when the whole "
|
||||
"module can be seen");
|
||||
return getPrimarySpecificPathsForAtMostOnePrimary()
|
||||
.SupplementaryOutputs.PackageModuleInterfaceOutputPath;
|
||||
}
|
||||
|
||||
std::string CompilerInvocation::getAPIDescriptorPathForWholeModule() const {
|
||||
assert(
|
||||
getFrontendOptions().InputsAndOutputs.isWholeModule() &&
|
||||
|
||||
Reference in New Issue
Block a user