================
@@ -247,10 +247,38 @@ Error executeCommands(StringRef ExecutablePath,
ArrayRef<StringRef> Args) {
if (Verbose || DryRun)
printCommands(Args);
- if (!DryRun)
+ if (DryRun)
+ return Error::success();
+
+ // If the command line fits within system limits, execute directly.
+ if (sys::commandLineFitsWithinSystemLimits(ExecutablePath, Args)) {
if (sys::ExecuteAndWait(ExecutablePath, Args))
return createStringError(
"'%s' failed", sys::path::filename(ExecutablePath).str().c_str());
+ return Error::success();
+ }
+
+ // Write the arguments to a response file and pass that instead.
+ auto TempFileOrErr = createOutputFile("response", "txt");
----------------
jhuber6 wrote:
Yeah, probably.
https://github.com/llvm/llvm-project/pull/183598
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits