[Windows] Fix limit on command line size
authorSerge Pavlov <sepavloff@gmail.com>
Tue, 14 Jul 2020 10:57:04 +0000 (17:57 +0700)
committerSerge Pavlov <sepavloff@gmail.com>
Tue, 21 Jul 2020 10:33:22 +0000 (17:33 +0700)
commitd4020ef7c474b5e695d77aa100d7f68dc0c66b4e
treef4864023652db5677c48271979bc7c3cc0cd7d64
parent30b015dbe9cca62e58333bdf84d947af6aca509f
[Windows] Fix limit on command line size

Documentation on CreateProcessW states that maximal size of command line
is 32767 characters including ternimation null character. In the
function llvm::sys::commandLineFitsWithinSystemLimits this limit was set
to 32768. As a result if command line was exactly 32768 characters long,
a response file was not created and CreateProcessW was called with
too long command line.

Differential Revision: https://reviews.llvm.org/D83772
llvm/include/llvm/Support/Program.h
llvm/lib/Support/Windows/Program.inc
llvm/unittests/Support/CommandLineTest.cpp