From 7d679310cca01190d25786b79eacd19e052e4de0 Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Wed, 12 Oct 2022 20:35:42 +0200 Subject: doc: Tweak manual and comments related to /showIncludes --- doc/MANUAL.adoc | 14 +++++++------- src/ArgsInfo.hpp | 2 +- src/ccache.cpp | 2 +- src/core/ShowIncludesParser.cpp | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/doc/MANUAL.adoc b/doc/MANUAL.adoc index e2ebf408..66750eeb 100644 --- a/doc/MANUAL.adoc +++ b/doc/MANUAL.adoc @@ -812,8 +812,8 @@ file in `/etc/rsyslog.d`: *msvc_dep_prefix* (*CCACHE_MSVC_DEP_PREFIX*):: This option specifies the prefix of included files output for MSVC compiler. - The default prefix is "Note: including file:", which is the output for English, - but if you use a localized compiler, this should be set accordingly. + The default prefix is "`Note: including file:`". If you use a localized + compiler, this should be set accordingly. [#config_namespace] *namespace* (*CCACHE_NAMESPACE*):: @@ -1556,7 +1556,7 @@ The direct mode will be disabled if any of the following holds: If the depend mode is enabled, ccache will not use the preprocessor at all. The hash used to identify results in the cache will be based on the direct mode hash described above plus information about include files read from the -dependency list generated by MSVC with /showIncludes, or the dependency file +dependency list generated by MSVC with `/showIncludes`, or the dependency file generated by other compilers with `-MD` or `-MMD`. Advantages: @@ -1573,9 +1573,9 @@ Disadvantages: setup where ccache will fall back to the preprocessor mode, which is tolerant to some types of changes of compiler options and source code changes. * If -MD is used, the manifest entries will include system header files as - well, thus slowing down cache hits slightly, just as using -MD slows down - make. This is also the case for MSVC with /showIncludes. -* If -MMD is used, the manifest entries will not include system header files, + well, thus slowing down cache hits slightly, just as using `-MD` slows down + make. This is also the case for MSVC with `/showIncludes`. +* If `-MMD` is used, the manifest entries will not include system header files, which means ccache will ignore changes in them. The depend mode will be disabled if any of the following holds: @@ -1583,7 +1583,7 @@ The depend mode will be disabled if any of the following holds: * <> is false. * <> is false. * The compiler is not generating dependencies using `-MD` or `-MMD` (for MSVC, - /showIncludes is added automatically if not specified by the user). + `/showIncludes` is added automatically if not specified by the user). == Handling of newly created header files diff --git a/src/ArgsInfo.hpp b/src/ArgsInfo.hpp index ce96ceed..b131f42d 100644 --- a/src/ArgsInfo.hpp +++ b/src/ArgsInfo.hpp @@ -75,7 +75,7 @@ struct ArgsInfo // Is the compiler being asked to output dependencies? bool generating_dependencies = false; - // Is the compiler being asked to output includes (MSVC -showIncludes)? + // Is the compiler being asked to output includes (MSVC /showIncludes)? bool generating_includes = false; // The dependency target in the dependency file (the object file unless diff --git a/src/ccache.cpp b/src/ccache.cpp index 5b8ce656..f3333365 100644 --- a/src/ccache.cpp +++ b/src/ccache.cpp @@ -693,7 +693,7 @@ struct DoExecuteResult util::Bytes stderr_data; }; -// Extract the used includes from -showIncludes output in stdout. Note that we +// Extract the used includes from /showIncludes output in stdout. Note that we // cannot distinguish system headers from other includes here. static std::optional result_key_from_includes(Context& ctx, Hash& hash, std::string_view stdout_data) diff --git a/src/core/ShowIncludesParser.cpp b/src/core/ShowIncludesParser.cpp index ca1b764c..f05521eb 100644 --- a/src/core/ShowIncludesParser.cpp +++ b/src/core/ShowIncludesParser.cpp @@ -27,9 +27,9 @@ namespace core::ShowIncludesParser { std::vector tokenize(std::string_view file_content, std::string_view prefix) { - // -showIncludes output is written to stdout together with other messages. - // Every line of it is ' ', prefix is 'Note: including - // file:' in English but can be localized. + // /showIncludes output is written to stdout together with other messages. + // Every line of it is " " where the prefix is "Note: + // including file:" in English but can be localized. std::vector result; // This will split at each \r or \n, but that simply means there will be empty -- cgit v1.2.1