mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user