Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maximum command line length in git bash

It looks like there is a hardwired limit of 8192 (or so) characters which is substantially less than the 32000 which is reported by

getconf ARG_MAX

I am using git bash as a very convenient (because deployed in a controlled mainstream way) method to run GNU make on Windows. The only problem which can sometimes hamper my process is the length of the command line to gcc which due to some unchangeable factors has several dozen up to a hundred -Iinclude_dir parameters. If you think that evading the problem by changing the latter intricacy would be the wiser option, I am all ears for a solution to that.

like image 989
Vroomfondel Avatar asked Apr 23 '26 01:04

Vroomfondel


1 Answers

https://www.betaarchive.com/wiki/index.php/Microsoft_KB_Archive/830473 Command line length limit on Windows is 2047 or 8191, depending on OS version.

Because of this limitation, many Windows developer tools accept "response files" which are text files containing arguments. GCC supports this too.

like image 71
ephemient Avatar answered Apr 25 '26 09:04

ephemient



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!