The Samba-Bugzilla – Bug 9875
Command too long when @file is used on Windows
Last modified: 2016-06-09 19:38:31 UTC
Windows has a limitation of 8K characters for commands.
Since compilation flags for large projects might exceed this limit (e.g. it has many include paths), @file.opt is commonly used.
The problem is that ccache expands @file and executes the preprocessor with raw arguments. This fails for very long commands...
Thanks for the bug report.
ccache needs to expand the file because it potentially needs to remove or rewrite arguments in the file, but ccache could very well construct a new temporary argument file on Windows when the command line size is larger than some threshold.
Moved to https://github.com/ccache/ccache/issues/95.