Closed bschommer closed 6 years ago
build_diversion is called from quote_files, used to produce the command line for calling the linker through run_command. When the resulting command line is longer than 8192 characters, this function dumps the command line to a file and applies bash to it. My understanding was that this is enough to pass arbitrarily long command lines to Cygwin programs (relying on some Cygwin magic). Is it not the case?
I'm not sure. However it would still be better to call the tool directly since process creation is expensive.
I think in order to have this working it would require some updates concerning uchar support, since I have no time to test this and the current setup works I will close this PR.
The new gnu_quote functions is an ocaml reimplementation of the libiberty writeargv function. Responsefiles will be create for msvc if the command line lenght is larger than 1024 and for gnu based tools for 8192.
This should solve issue #7 .