Bug fixes
~~~~~~~~~
+- Bail out on too hard compiler option `-P`.
+
- Fixed clang test suite when running on Linux.
- Fixed build and test for MinGW32 and Windows.
{"-MM", TOO_HARD},
{"-MQ", TAKES_ARG},
{"-MT", TAKES_ARG},
+ {"-P", TOO_HARD},
{"-U", AFFECTS_CPP | TAKES_ARG | TAKES_CONCAT_ARG},
{"-V", TAKES_ARG},
{"-Xassembler", TAKES_ARG},
expect_stat 'cache miss' 1
expect_stat 'files in cache' 0
+ # -------------------------------------------------------------------------
+ TEST "-P"
+
+ # Check that -P disables ccache. (-P removes preprocessor information in
+ # such a way that the object file from compiling the preprocessed file will
+ # not be equal to the object file produced when compiling without ccache.)
+
+ $CCACHE_COMPILE -c -P test1.c
+ expect_stat 'cache hit (direct)' 0
+ expect_stat 'cache hit (preprocessed)' 0
+ expect_stat 'cache miss' 0
+ expect_stat 'unsupported compiler option' 1
+
# -------------------------------------------------------------------------
TEST "-Wp,-P"