Bug 9875 - Command too long when @file is used on Windows
Command too long when @file is used on Windows
Product: ccache
Classification: Unclassified
Component: ccache
All Windows XP
: P5 normal
: ---
Assigned To: Joel Rosdahl
Joel Rosdahl
Depends on:
  Show dependency treegraph
Reported: 2013-05-09 06:00 UTC by Orgad Shaneh
Modified: 2016-06-09 19:38 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Orgad Shaneh 2013-05-09 06:00:07 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...
Comment 1 Joel Rosdahl 2013-08-08 19:53:11 UTC
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.
Comment 2 Joel Rosdahl 2016-06-09 19:38:31 UTC
Moved to https://github.com/ccache/ccache/issues/95.