]> git.ipfire.org Git - thirdparty/ccache.git/commit
fix: Handle Unix-style paths as non-options to MSVC
authorJoel Rosdahl <joel@rosdahl.net>
Fri, 3 Feb 2023 12:11:57 +0000 (13:11 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 5 Feb 2023 20:06:27 +0000 (21:06 +0100)
commit3781f2567d92f11a41fe5ba8099f8c9a6b5497d2
tree204380c8470fc8d9f4ff590911299f700d3084f0
parent20ab91b3031a9c6a3ad00d2fec2b7e60ec52abd8
fix: Handle Unix-style paths as non-options to MSVC

For MSVC, ccache treats all arguments starting with a slash as an
option, which makes it fail to detect the source code file if it's
passed as a Unix-style absolute path.

Fix this by not treating an argument as an option if it's (a) an unknown
option, and (b) the argument exists as a file in the file system.

Fixes #1230.
src/argprocessing.cpp
unittest/test_argprocessing.cpp