Skip to content

Commit a41919c

Browse files
authored
Merge pull request #81555 from hamishknight/no-response
[Driver] Avoid using response files for SourceKit
2 parents 029c876 + 6eb76df commit a41919c

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

lib/Driver/ToolChain.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ std::optional<Job::ResponseFileInfo>
7272
ToolChain::getResponseFileInfo(const Compilation &C, const char *executablePath,
7373
const ToolChain::InvocationInfo &invocationInfo,
7474
const ToolChain::JobContext &context) const {
75+
// Never use a response file if this is a dummy driver for SourceKit, we
76+
// just want the frontend arguments.
77+
if (getDriver().isDummyDriverForFrontendInvocation())
78+
return std::nullopt;
79+
7580
const bool forceResponseFiles =
7681
C.getArgs().hasArg(options::OPT_driver_force_response_files);
7782
assert((invocationInfo.allowsResponseFiles || !forceResponseFiles) &&
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// Make sure we don't create any temporary files.
2+
// RUN: %empty-directory(%t)
3+
// RUN: env TMP=%t TMPDIR=%t %sourcekitd-test -req=open %s -- %s -driver-force-response-files
4+
// RUN: not ls %t/* >/dev/null 2>&1

0 commit comments

Comments
 (0)