mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Caching] Reduce the number of cas ID passed on frontend commandline
Using IncludeTree::FileList to concat the include tree file systems that are passed on the command-line. This significantly reduce the command-line size, and also makes the cache key computation a lot faster. rdar://148752988
This commit is contained in:
@@ -763,10 +763,10 @@ static bool ParseCASArgs(CASOptions &Opts, ArgList &Args,
|
||||
|
||||
for (const auto &A : Args.getAllArgValues(OPT_cas_fs))
|
||||
Opts.CASFSRootIDs.emplace_back(A);
|
||||
for (const auto &A : Args.getAllArgValues(OPT_clang_include_tree_root))
|
||||
Opts.ClangIncludeTrees.emplace_back(A);
|
||||
for (const auto &A : Args.getAllArgValues(OPT_clang_include_tree_filelist))
|
||||
Opts.ClangIncludeTreeFileList.emplace_back(A);
|
||||
if (auto *A = Args.getLastArg(OPT_clang_include_tree_root))
|
||||
Opts.ClangIncludeTree = A->getValue();
|
||||
if (auto *A = Args.getLastArg(OPT_clang_include_tree_filelist))
|
||||
Opts.ClangIncludeTreeFileList = A->getValue();
|
||||
|
||||
if (const Arg *A = Args.getLastArg(OPT_input_file_key))
|
||||
Opts.InputFileKey = A->getValue();
|
||||
@@ -774,7 +774,7 @@ static bool ParseCASArgs(CASOptions &Opts, ArgList &Args,
|
||||
if (const Arg*A = Args.getLastArg(OPT_bridging_header_pch_key))
|
||||
Opts.BridgingHeaderPCHCacheKey = A->getValue();
|
||||
|
||||
if (!Opts.CASFSRootIDs.empty() || !Opts.ClangIncludeTrees.empty() ||
|
||||
if (!Opts.CASFSRootIDs.empty() || !Opts.ClangIncludeTree.empty() ||
|
||||
!Opts.ClangIncludeTreeFileList.empty())
|
||||
Opts.HasImmutableFileSystem = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user