Skip to content

Makefile: Fix command line limits for static libs

Viktor Mukha requested to merge khvMX/cmake:master into master

I have been hitting the Windows command-line limit when cross-compiling static library (POCO) and having more than 8000 characters in the call to "ar". Calculating exact limits here are tricky, since this particular limit will only take into account object file strings, which is correct for response files, but not for the archive rules (link.txt files), since they also contain the call to "ar" and its arguments. Also, there can be other additional arguments if "ar" tool is wrapped into something else, so it is a good idea to leave more space than trying to exactly fit the limit. Since response files use half of the limit as a heuristic, we reproduce it here for consistency.

Topic-rename: makefile-ar-limits

Edited by Brad King

Merge request reports