Bug fixes
~~~~~~~~~
+- Fixed an issue when compiler option `-Wp,-MT,path` is used instead of `-MT
+ path` (and similar for `-MF`, `-MP` and `-MQ`) and `run_second_cpp`
+ (`CCACHE_CPP2`) is enabled.
+
- ccache now understands the undocumented `-coverage` (only one dash) GCC
option.
output_dep = make_relative_path(x_strdup(argv[i] + 9));
args_add(dep_args, argv[i]);
continue;
+ } else if (str_startswith(argv[i], "-Wp,-M")) {
+ /* -MF, -MP, -MQ, -MT, etc. TODO: Make argument to MF/MQ/MT
+ * relative. */
+ args_add(dep_args, argv[i]);
+ continue;
} else if (conf->direct_mode) {
/*
* -Wp, can be used to pass too hard options to
cc_log("Unsupported compiler option for direct mode: %s", argv[i]);
conf->direct_mode = false;
}
+
+ /* Any other -Wp,* arguments are only relevant for the preprocessor. */
+ args_add(cpp_args, argv[i]);
+ continue;
}
if (str_eq(argv[i], "-MP")) {
args_add(dep_args, argv[i]);
/*
- * Copyright (C) 2010-2015 Joel Rosdahl
+ * Copyright (C) 2010-2016 Joel Rosdahl
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
{
#define CMD \
"cc -MD -MMD -MP -MF foo.d -MT mt1 -MT mt2 -MQ mq1 -MQ mq2" \
- " -Wp,-MD,wpmd -Wp,-MMD,wpmmd"
+ " -Wp,-MD,wpmd -Wp,-MMD,wpmmd -Wp,-MP -Wp,-MT,wpmt -Wp,-MQ,wpmq -Wp,-MF,wpf"
struct args *orig = args_init_from_string(CMD " -c foo.c -o foo.o");
struct args *exp_cpp = args_init_from_string(CMD);
#undef CMD
" -include test.h -include-pch test.pch -iprefix . -iquote ." \
" -isysroot . -isystem . -iwithprefix . -iwithprefixbefore ." \
" -DTEST_MACRO -DTEST_MACRO2=1 -F. -trigraphs -fworking-directory" \
- " -fno-working-directory -MD -MMD -MP -MF foo.d -MT mt1 -MT mt2 " \
- " -MQ mq1 -MQ mq2 -Wp,-MD,wpmd -Wp,-MMD,wpmmd"
+ " -fno-working-directory -MD -MMD -MP -MF foo.d -MT mt1 -MT mt2" \
+ " -MQ mq1 -MQ mq2 -Wp,-MD,wpmd -Wp,-MMD,wpmmd -Wp,-MP -Wp,-MT,wpmt" \
+ " -Wp,-MQ,wpmq -Wp,-MF,wpf"
struct args *orig = args_init_from_string(CMD " -c foo.c -o foo.o");
struct args *exp_cpp = args_init_from_string(CMD);
#undef CMD