mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge pull request #38939 from xymus/emit-module-separately-interface-hash
[Frontend] Generate an interface hash for emit-module-separately jobs
This commit is contained in:
@@ -1153,10 +1153,10 @@ CompilerInstance::getSourceFileParsingOptions(bool forPrimary) const {
|
||||
opts |= SourceFile::ParsingFlags::DisableDelayedBodies;
|
||||
}
|
||||
|
||||
auto typeOpts = getASTContext().TypeCheckerOpts;
|
||||
if (forPrimary || isWholeModuleCompilation()) {
|
||||
// Disable delayed body parsing for primaries and in WMO, unless
|
||||
// forcefully skipping function bodies
|
||||
auto typeOpts = getASTContext().TypeCheckerOpts;
|
||||
if (typeOpts.SkipFunctionBodies == FunctionBodySkipping::None)
|
||||
opts |= SourceFile::ParsingFlags::DisableDelayedBodies;
|
||||
} else {
|
||||
@@ -1165,9 +1165,10 @@ CompilerInstance::getSourceFileParsingOptions(bool forPrimary) const {
|
||||
opts |= SourceFile::ParsingFlags::SuppressWarnings;
|
||||
}
|
||||
|
||||
// Enable interface hash computation for primaries, but not in WMO, as it's
|
||||
// only currently needed for incremental mode.
|
||||
if (forPrimary) {
|
||||
// Enable interface hash computation for primaries or emit-module-separately,
|
||||
// but not in WMO, as it's only currently needed for incremental mode.
|
||||
if (forPrimary ||
|
||||
typeOpts.SkipFunctionBodies == FunctionBodySkipping::NonInlinableWithoutTypes) {
|
||||
opts |= SourceFile::ParsingFlags::EnableInterfaceHash;
|
||||
}
|
||||
return opts;
|
||||
|
||||
Reference in New Issue
Block a user