mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Revert "[Caching][NFC] Using llvm::cas::CASConfiguration"
This reverts commit 4f059033bb. The change
is actually not NFC since previously, there is a cache in the
CompilerInvocation that prevents the same CAS from the same CASOptions
from being initialized multiple times, which was relied upon when
running inside sub invocation. When switching to a non-caching simple
CASOption types, it causes every single sub instance will create its own
CAS, and it can consume too many file descriptors and causing errors
during dependency scanning.
rdar://164903080
This commit is contained in:
@@ -804,15 +804,15 @@ static bool ParseCASArgs(CASOptions &Opts, ArgList &Args,
|
||||
Opts.EnableCachingRemarks |= Args.hasArg(OPT_cache_remarks);
|
||||
Opts.CacheSkipReplay |= Args.hasArg(OPT_cache_disable_replay);
|
||||
if (const Arg *A = Args.getLastArg(OPT_cas_path))
|
||||
Opts.Config.CASPath = A->getValue();
|
||||
Opts.CASOpts.CASPath = A->getValue();
|
||||
|
||||
if (const Arg *A = Args.getLastArg(OPT_cas_plugin_path))
|
||||
Opts.Config.PluginPath = A->getValue();
|
||||
Opts.CASOpts.PluginPath = A->getValue();
|
||||
|
||||
for (StringRef Opt : Args.getAllArgValues(OPT_cas_plugin_option)) {
|
||||
StringRef Name, Value;
|
||||
std::tie(Name, Value) = Opt.split('=');
|
||||
Opts.Config.PluginOptions.emplace_back(std::string(Name),
|
||||
Opts.CASOpts.PluginOptions.emplace_back(std::string(Name),
|
||||
std::string(Value));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user