Use SWIFT_MODULE_CACHE_PATH for all tools.

Now that the standard library depends on Clang headers, every single tool
needs to specifically avoid using the default module cache when
SWIFT_MODULE_CACHE_PATH is set.

<rdar://problem/16294222>

Swift SVN r14937
This commit is contained in:
Jordan Rose
2014-03-12 00:27:24 +00:00
parent a440870268
commit 49ec7c1ea1
5 changed files with 17 additions and 4 deletions

View File

@@ -46,6 +46,10 @@ static llvm::cl::opt<bool>
DumpModule("dump-module",
llvm::cl::desc("Dump the imported module after checking it imports just fine"));
static llvm::cl::opt<std::string>
ModuleCachePath("module-cache-path", llvm::cl::desc("Clang module cache path"),
llvm::cl::init(SWIFT_MODULE_CACHE_PATH));
void anchorForGetMainExecutable() {}
@@ -75,6 +79,7 @@ int main(int argc, char **argv) {
Invocation.setSDKPath(SDK);
Invocation.setTargetTriple(llvm::sys::getDefaultTargetTriple());
Invocation.setModuleName("lldbtest");
Invocation.getClangImporterOptions().ModuleCachePath = ModuleCachePath;
if (CI.setup(Invocation))
return 1;