mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge pull request #85010 from artemcm/AlwaysRebuildExplicitInterface
[Explicit Module Builds] Always rebuild the target module in explicit `-compile-module-from-interface` builds.
This commit is contained in:
@@ -1609,27 +1609,6 @@ bool ModuleInterfaceLoader::buildExplicitSwiftModuleFromSwiftInterface(
|
||||
StringRef outputPath, bool ShouldSerializeDeps,
|
||||
ArrayRef<std::string> CompiledCandidates,
|
||||
DependencyTracker *tracker) {
|
||||
|
||||
if (!Instance.getInvocation().getIRGenOptions().AlwaysCompile) {
|
||||
// First, check if the expected output already exists and possibly
|
||||
// up-to-date w.r.t. all of the dependencies it was built with. If so, early
|
||||
// exit.
|
||||
UpToDateModuleCheker checker(
|
||||
Instance.getASTContext());
|
||||
ModuleRebuildInfo rebuildInfo;
|
||||
SmallVector<FileDependency, 3> allDeps;
|
||||
std::unique_ptr<llvm::MemoryBuffer> moduleBuffer;
|
||||
if (checker.swiftModuleIsUpToDate(outputPath, rebuildInfo, allDeps,
|
||||
moduleBuffer)) {
|
||||
if (Instance.getASTContext()
|
||||
.LangOpts.EnableSkipExplicitInterfaceModuleBuildRemarks) {
|
||||
Instance.getDiags().diagnose(
|
||||
SourceLoc(), diag::explicit_interface_build_skipped, outputPath);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Read out the compiler version.
|
||||
llvm::BumpPtrAllocator alloc;
|
||||
llvm::StringSaver ArgSaver(alloc);
|
||||
|
||||
Reference in New Issue
Block a user