]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Rename sloppiness no_system_headers to system_headers for consistency
authorJoel Rosdahl <joel@rosdahl.net>
Wed, 9 Jan 2019 19:50:20 +0000 (20:50 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Wed, 9 Jan 2019 19:50:20 +0000 (20:50 +0100)
no_system_headers can still be used as an (undocumented) alias.

Closes #337.

doc/MANUAL.adoc
doc/NEWS.adoc
src/ccache.c
src/ccache.h
src/confitems.c
unittest/test_conf.c

index 73d71759b511639c75078fb1023e8253b63d4f3d..7a5766054b93f45498e7a74b36561714f153beb3 100644 (file)
@@ -560,13 +560,13 @@ still has to do _some_ preprocessing (like macros).
     ccache includes the environment variables *LANG*, *LC_ALL*, *LC_CTYPE* and
     *LC_MESSAGES* in the hash by default since they may affect localization of
     compiler warning messages. Set this option to tell ccache not to do that.
-*no_system_headers*::
-    By default, ccache will also include all system headers in the manifest.
-    With this option set, ccache will only include system headers in the hash
-    but not add the system header files to the list of include files.
 *pch_defines*::
     Be sloppy about **#define**s when precompiling a header file. See
     <<_precompiled_headers,PRECOMPILED HEADERS>> for more information.
+*system_headers*::
+    By default, ccache will also include all system headers in the manifest.
+    With this option set, ccache will only include system headers in the hash
+    but not add the system header files to the list of include files.
 *time_macros*::
     Ignore `__DATE__` and `__TIME__` being present in the source code.
 --
index 54f5d506f67685e8ac5fd56e05cdc4f65b0ef6b4..928ee56c2a9827263eb05c36936e0184ed978db1 100644 (file)
@@ -38,6 +38,10 @@ Changes
   path derived from the local project path. Note that the index store won't be
   updated correctly on cache hits if you enable this option.
 
+- Rename sloppiness `no_system_headers` to `system_headers` for consistency
+  with other options. `no_system_headers` can still be used as an
+  (undocumented) alias.
+
 
 ccache 3.5.1
 ------------
index c2aa9cd6cbbb1cb7dc8c57ddaf0cdd46a595343f..c7e949fe20a7a60bb6ad3525b826b11871f9c00c 100644 (file)
@@ -600,7 +600,7 @@ remember_include_file(char *path, struct hash *cpp_hash, bool system,
                goto out;
        }
 
-       if (system && (conf->sloppiness & SLOPPY_NO_SYSTEM_HEADERS)) {
+       if (system && (conf->sloppiness & SLOPPY_SYSTEM_HEADERS)) {
                // Don't remember this system header.
                goto out;
        }
index 170fdb567fc878ccac0f2f59fea8c2c51a607c37..ab0469d1c16288fd9405aca2241b3f95b65c5de1 100644 (file)
@@ -94,7 +94,7 @@ extern enum guessed_compiler guessed_compiler;
 #define SLOPPY_FILE_STAT_MATCHES (1U << 5)
 // Allow us to not include any system headers in the manifest include files,
 // similar to -MM versus -M for dependencies.
-#define SLOPPY_NO_SYSTEM_HEADERS (1U << 6)
+#define SLOPPY_SYSTEM_HEADERS (1U << 6)
 // Allow us to ignore ctimes when comparing file stats, so we can fake mtimes
 // if we want to (it is much harder to fake ctimes, requires changing clock)
 #define SLOPPY_FILE_STAT_MATCHES_CTIME (1U << 7)
index 0ef121bd0a9ae72d93a6d93dc12522bb9f435654..f6fb89d29edf2b684abe2e26d4e3e016a375ad02 100644 (file)
@@ -130,8 +130,9 @@ confitem_parse_sloppiness(const char *str, void *result, char **errmsg)
                        *value |= SLOPPY_INCLUDE_FILE_CTIME;
                } else if (str_eq(word, "include_file_mtime")) {
                        *value |= SLOPPY_INCLUDE_FILE_MTIME;
-               } else if (str_eq(word, "no_system_headers")) {
-                       *value |= SLOPPY_NO_SYSTEM_HEADERS;
+               } else if (str_eq(word, "system_headers")
+                          || str_eq(word, "no_system_headers")) {
+                       *value |= SLOPPY_SYSTEM_HEADERS;
                } else if (str_eq(word, "pch_defines")) {
                        *value |= SLOPPY_PCH_DEFINES;
                } else if (str_eq(word, "time_macros")) {
@@ -177,8 +178,8 @@ confitem_format_sloppiness(void *value)
        if (*sloppiness & SLOPPY_FILE_STAT_MATCHES_CTIME) {
                reformat(&s, "%sfile_stat_matches_ctime, ", s);
        }
-       if (*sloppiness & SLOPPY_NO_SYSTEM_HEADERS) {
-               reformat(&s, "%sno_system_headers, ", s);
+       if (*sloppiness & SLOPPY_SYSTEM_HEADERS) {
+               reformat(&s, "%ssystem_headers, ", s);
        }
        if (*sloppiness & SLOPPY_CLANG_INDEX_STORE) {
                reformat(&s, "%sclang_index_store, ", s);
index e90435e75e8634bd76b965280aa72ef5917a3ce4..371a3951607e4ddd8f368a9591d469279422571a 100644 (file)
@@ -132,7 +132,7 @@ TEST(conf_read_valid_config)
                "read_only_direct = true\n"
                "recache = true\n"
                "run_second_cpp = false\n"
-               "sloppiness =     file_macro   ,time_macros,  include_file_mtime,include_file_ctime,file_stat_matches,file_stat_matches_ctime,pch_defines ,  no_system_headers,clang_index_store,locale\n"
+               "sloppiness =     file_macro   ,time_macros,  include_file_mtime,include_file_ctime,file_stat_matches,file_stat_matches_ctime,pch_defines ,  no_system_headers,system_headers,clang_index_store\n"
                "stats = false\n"
                "temporary_dir = ${USER}_foo\n"
                "umask = 777\n"
@@ -179,10 +179,9 @@ TEST(conf_read_valid_config)
                |SLOPPY_TIME_MACROS
                |SLOPPY_FILE_STAT_MATCHES
                |SLOPPY_FILE_STAT_MATCHES_CTIME
-               |SLOPPY_NO_SYSTEM_HEADERS
+               |SLOPPY_SYSTEM_HEADERS
                |SLOPPY_PCH_DEFINES
-               |SLOPPY_CLANG_INDEX_STORE
-               |SLOPPY_LOCALE,
+               |SLOPPY_CLANG_INDEX_STORE,
                conf->sloppiness);
        CHECK(!conf->stats);
        CHECK_STR_EQ_FREE1(format("%s_foo", user), conf->temporary_dir);
@@ -470,16 +469,10 @@ TEST(conf_print_items)
                true,
                true,
                .run_second_cpp = false,
-               SLOPPY_FILE_MACRO
-               |SLOPPY_INCLUDE_FILE_MTIME
-               |SLOPPY_INCLUDE_FILE_CTIME
-               |SLOPPY_TIME_MACROS
-               |SLOPPY_FILE_STAT_MATCHES
-               |SLOPPY_FILE_STAT_MATCHES_CTIME
-               |SLOPPY_PCH_DEFINES
-               |SLOPPY_NO_SYSTEM_HEADERS
-               |SLOPPY_CLANG_INDEX_STORE
-               |SLOPPY_LOCALE,
+               SLOPPY_FILE_MACRO|SLOPPY_INCLUDE_FILE_MTIME|
+               SLOPPY_INCLUDE_FILE_CTIME|SLOPPY_TIME_MACROS|
+               SLOPPY_FILE_STAT_MATCHES|SLOPPY_FILE_STAT_MATCHES_CTIME|
+               SLOPPY_PCH_DEFINES|SLOPPY_SYSTEM_HEADERS|SLOPPY_CLANG_INDEX_STORE,
                false,
                "td",
                022,
@@ -531,7 +524,8 @@ TEST(conf_print_items)
        CHECK_STR_EQ("run_second_cpp = false", received_conf_items[n++].descr);
        CHECK_STR_EQ("sloppiness = file_macro, include_file_mtime,"
                     " include_file_ctime, time_macros, pch_defines,"
-                    " file_stat_matches, file_stat_matches_ctime, no_system_headers, clang_index_store, locale",
+                    " file_stat_matches, file_stat_matches_ctime, system_headers,"
+                    " clang_index_store",
                     received_conf_items[n++].descr);
        CHECK_STR_EQ("stats = false", received_conf_items[n++].descr);
        CHECK_STR_EQ("temporary_dir = td", received_conf_items[n++].descr);