mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Dependency Scanning] Produce canonical output path for Swift binary modules.
Instead of relying on the client (driver) to perform its own computation of the matching output path.
This commit is contained in:
@@ -118,12 +118,15 @@ ErrorOr<ModuleDependencies> ModuleDependencyScanner::scanInterfaceFile(
|
||||
std::string InPath = moduleInterfacePath.str();
|
||||
auto compiledCandidates = getCompiledCandidates(Ctx, realModuleName.str(),
|
||||
InPath);
|
||||
Result = ModuleDependencies::forSwiftInterfaceModule(InPath,
|
||||
compiledCandidates,
|
||||
Args,
|
||||
PCMArgs,
|
||||
Hash,
|
||||
isFramework);
|
||||
|
||||
SmallString<128> outputPathBase(moduleCachePath);
|
||||
llvm::sys::path::append(
|
||||
outputPathBase,
|
||||
moduleName.str() + "-" + Hash + "." +
|
||||
file_types::getExtension(file_types::TY_SwiftModuleFile));
|
||||
Result = ModuleDependencies::forSwiftInterfaceModule(
|
||||
outputPathBase.str().str(), InPath, compiledCandidates, Args, PCMArgs,
|
||||
Hash, isFramework);
|
||||
// Open the interface file.
|
||||
auto &fs = *Ctx.SourceMgr.getFileSystem();
|
||||
auto interfaceBuf = fs.getBufferForFile(moduleInterfacePath);
|
||||
|
||||
Reference in New Issue
Block a user