]> git.ipfire.org Git - thirdparty/ccache.git/commit
feat: Support overriding MSVC /Z* options
authorJoel Rosdahl <joel@rosdahl.net>
Wed, 8 Mar 2023 07:10:27 +0000 (08:10 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Wed, 8 Mar 2023 09:07:12 +0000 (10:07 +0100)
commitd099c1804f56e7a357c8c8473cacf186da0d5d3e
treea5a9897c3dc90ae9209ae5b2133632dedc5809ca
parenta179db209ba347209682b19298f5c4d4b4d4a5c7
feat: Support overriding MSVC /Z* options

MSVC options /Zi and /ZI are too hard since they produce separate PDB
files. /Z7 is OK, but if the command line contains /Zi or /ZI followed
by /Z7, MSVC will use the latter (with a warning) but ccache will still
consider the command line too hard.

This commit makes ccache understand that only the last /Z* option will
be used and thus accepts the command line if the last /Z* option is /Z7.

Closes #1239.
src/argprocessing.cpp
src/compopt.cpp
unittest/test_argprocessing.cpp