[CAS] swift dependency scanning using CAS for compiler caching (#66366)

Teach swift dependency scanner to use CAS to capture the full dependencies for a build and construct build commands with immutable inputs from CAS.

This allows swift compilation caching using CAS.
This commit is contained in:
Steven Wu
2023-06-12 10:55:53 -07:00
committed by GitHub
parent 2db4a038c3
commit b1f99b8e93
34 changed files with 2671 additions and 298 deletions

View File

@@ -140,7 +140,10 @@ using SwiftInterfaceModuleDetailsLayout =
FileIDArrayIDField, // sourceFiles
FileIDArrayIDField, // bridgingSourceFiles
FileIDArrayIDField, // bridgingModuleDependencies
DependencyIDArrayIDField // swiftOverlayDependencies
DependencyIDArrayIDField, // swiftOverlayDependencies
IdentifierIDField, // CASFileSystemRootID
IdentifierIDField, // bridgingHeaderIncludeTree
IdentifierIDField // moduleCacheKey
>;
using SwiftSourceModuleDetailsLayout =
@@ -150,7 +153,11 @@ using SwiftSourceModuleDetailsLayout =
FileIDArrayIDField, // sourceFiles
FileIDArrayIDField, // bridgingSourceFiles
FileIDArrayIDField, // bridgingModuleDependencies
DependencyIDArrayIDField // swiftOverlayDependencies
DependencyIDArrayIDField, // swiftOverlayDependencies
IdentifierIDField, // CASFileSystemRootID
IdentifierIDField, // bridgingHeaderIncludeTree
FlagIDArrayIDField, // buildCommandLine
FlagIDArrayIDField // bridgingHeaderBuildCommandLine
>;
using SwiftBinaryModuleDetailsLayout =
@@ -158,7 +165,8 @@ using SwiftBinaryModuleDetailsLayout =
FileIDField, // compiledModulePath
FileIDField, // moduleDocPath
FileIDField, // moduleSourceInfoPath
IsFrameworkField // isFramework
IsFrameworkField, // isFramework
IdentifierIDField // moduleCacheKey
>;
using SwiftPlaceholderModuleDetailsLayout =
@@ -175,7 +183,10 @@ using ClangModuleDetailsLayout =
ContextHashIDField, // contextHash
FlagIDArrayIDField, // commandLine
FileIDArrayIDField, // fileDependencies
FlagIDArrayIDField // capturedPCMArgs
FlagIDArrayIDField, // capturedPCMArgs
IdentifierIDField, // CASFileSystemRootID
IdentifierIDField, // clangIncludeTreeRoot
IdentifierIDField // moduleCacheKey
>;
} // namespace graph_block