This is done to keep the argument order between -Werror and -Wno-error.
Fixes #451.
e.g. ecryptfs or btrfs/zfs with transparent compression. This also fixes a
related problem with ccache's own test suite.
+- Fixed a regression in 3.7.2 when using the compiler option “-Werror” and then
+ “-Wno-error” later on the command line.
-ccache 3.7.2
+
+ccache 4.7.2
------------
Release date: 2019-07-19
{"-Wa,", TAKES_CONCAT_ARG | AFFECTS_COMP},
{"-Werror", AFFECTS_COMP}, // don't exit with error when preprocessing
{"-Wl,", TAKES_CONCAT_ARG | AFFECTS_COMP},
+ {"-Wno-error", AFFECTS_COMP},
{"-Xassembler", TAKES_ARG | TAKES_CONCAT_ARG | AFFECTS_COMP},
{"-Xclang", TAKES_ARG},
{"-Xlinker", TAKES_ARG | TAKES_CONCAT_ARG | AFFECTS_COMP},
TEST(options_not_to_be_passed_to_the_preprocesor)
{
struct args *orig = args_init_from_string(
- "cc -Wa,foo foo.c -g -Xlinker fie -Xlinker,fum -c -Werror");
- struct args *exp_cpp = args_init_from_string("cc -g");
+ "cc -Wa,foo foo.c -g -c -DX -Werror -Xlinker fie -Xlinker,fum -Wno-error");
+ struct args *exp_cpp = args_init_from_string("cc -g -DX");
struct args *exp_cc = args_init_from_string(
- "cc -g -Wa,foo -Xlinker fie -Xlinker,fum -Werror -c");
+ "cc -g -Wa,foo -Werror -Xlinker fie -Xlinker,fum -Wno-error -DX -c");
struct args *act_cpp = NULL;
struct args *act_cc = NULL;