failed();
}
+ if (!found_c_opt) {
+ cc_log("No -c option found");
+ /* I find that having a separate statistic for autoconf tests is useful,
+ as they are the dominant form of "called for link" in many cases */
+ if (strstr(input_file, "conftest.")) {
+ stats_update(STATS_CONFTEST);
+ } else {
+ stats_update(STATS_LINK);
+ }
+ failed();
+ }
+
if (explicit_language && strcmp(explicit_language, "none") == 0) {
explicit_language = NULL;
}
i_extension = extension_for_language(p_language) + 1;
}
- if (!found_c_opt) {
- cc_log("No -c option found");
- /* I find that having a separate statistic for autoconf tests is useful,
- as they are the dominant form of "called for link" in many cases */
- if (strstr(input_file, "conftest.")) {
- stats_update(STATS_CONFTEST);
- } else {
- stats_update(STATS_LINK);
- }
- failed();
- }
-
/* don't try to second guess the compilers heuristics for stdout handling */
if (output_obj && strcmp(output_obj, "-") == 0) {
stats_update(STATS_OUTSTDOUT);
$CCACHE_COMPILE test1.c -o test 2> /dev/null
checkstat 'called for link' 1
+ testname="linkobj"
+ $CCACHE_COMPILE foo.o -o test 2> /dev/null
+ checkstat 'called for link' 2
+
testname="multiple"
$CCACHE_COMPILE -c test1.c test2.c
checkstat 'multiple source files' 1