mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Frontend: teach -compile-module-from-interface action to emit ABI descriptor as byproduct
We have implemented a libSwiftDriver-based tool to generate prebuilt module cache for entire SDKs. Anchored on the same infrastructure, we could also generate ABI baselines for entire SDKs.
This commit is contained in:
@@ -412,13 +412,15 @@ static bool buildModuleFromInterface(CompilerInstance &Instance) {
|
||||
StringRef InputPath = FEOpts.InputsAndOutputs.getFilenameOfFirstInput();
|
||||
StringRef PrebuiltCachePath = FEOpts.PrebuiltModuleCachePath;
|
||||
ModuleInterfaceLoaderOptions LoaderOpts(FEOpts);
|
||||
StringRef ABIPath = Instance.getPrimarySpecificPathsForAtMostOnePrimary()
|
||||
.SupplementaryOutputs.ABIDescriptorOutputPath;
|
||||
return ModuleInterfaceLoader::buildSwiftModuleFromSwiftInterface(
|
||||
Instance.getSourceMgr(), Instance.getDiags(),
|
||||
Invocation.getSearchPathOptions(), Invocation.getLangOptions(),
|
||||
Invocation.getClangImporterOptions(),
|
||||
Invocation.getClangModuleCachePath(), PrebuiltCachePath,
|
||||
FEOpts.BackupModuleInterfaceDir,
|
||||
Invocation.getModuleName(), InputPath, Invocation.getOutputFilename(),
|
||||
Invocation.getModuleName(), InputPath, Invocation.getOutputFilename(), ABIPath,
|
||||
FEOpts.SerializeModuleInterfaceDependencyHashes,
|
||||
FEOpts.shouldTrackSystemDependencies(), LoaderOpts,
|
||||
RequireOSSAModules_t(Invocation.getSILOptions()));
|
||||
|
||||
Reference in New Issue
Block a user