]> git.ipfire.org Git - thirdparty/ccache.git/commit
fix: Don't add additional depend mode options after Clang -- option
authorJoel Rosdahl <joel@rosdahl.net>
Mon, 17 Apr 2023 18:51:38 +0000 (20:51 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Mon, 17 Apr 2023 19:27:01 +0000 (21:27 +0200)
commite58da98645dded3b87b4ffa9b206f9d1fdce53d7
tree9faca2b98e8e511f0d41b51c1606c4763bab5e90
parentcfc9b99c8070df1aabad167ac7bae4e0a0ce92bc
fix: Don't add additional depend mode options after Clang -- option

With the depend mode enabled, ccache executes the original command line
verbatim, potentially with the addition of a few extra options. However,
for clang or clang-cl it is not possible to simply append the additional
options to the end of the original command line since there may be a
"--" option to indicate the end of options.

Fix this by inserting the additional options directly after the compiler
instead of at the end.

Fixes #1273.
src/ccache.cpp
test/suites/depend.bash