[CAS] Integrate CAS into swift compiler

Teach swift compiler about CAS to allow compiler caching in the future.
1) Add flags to initiate CAS inside swift-frontend
2) Teach swift to compile using a CAS file system.
This commit is contained in:
Steven Wu
2023-04-10 19:37:00 -07:00
parent 78c1711169
commit e2c494179d
12 changed files with 157 additions and 3 deletions

View File

@@ -1452,6 +1452,11 @@ static bool ParseClangImporterArgs(ClangImporterOptions &Opts,
Opts.DisableSourceImport |=
Args.hasArg(OPT_disable_clangimporter_source_import);
// Forward the FrontendOptions to clang importer option so it can be
// accessed when creating clang module compilation invocation.
if (FrontendOpts.EnableCAS)
Opts.CASPath = FrontendOpts.CASPath;
return false;
}