mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[BatchMode] Avoid spurious warnings in sourcekitd and indexing
Explicitly disable batch mode in createCompilerInvocation, since it uses -force-single-frontend-invocation. Previously we were getting spurious warnings. Also add a test that -disable-batch-mode will allow commands that use -index-file to avoid the same warning, since that is likely what they want to do as well. rdar://39581506
This commit is contained in:
@@ -34,6 +34,11 @@ swift::driver::createCompilerInvocation(ArrayRef<const char *> Argv,
|
||||
// frontend command.
|
||||
Args.push_back("-force-single-frontend-invocation");
|
||||
|
||||
// Explictly disable batch mode to avoid a spurious warning when combining
|
||||
// -enable-batch-mode with -force-single-frontend-invocation. This is an
|
||||
// implementation detail.
|
||||
Args.push_back("-disable-batch-mode");
|
||||
|
||||
// Avoid using filelists
|
||||
std::string neverThreshold =
|
||||
std::to_string(Compilation::NEVER_USE_FILELIST);
|
||||
|
||||
Reference in New Issue
Block a user