summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Rosdahl <joel@rosdahl.net>2022-10-12 20:35:42 +0200
committerJoel Rosdahl <joel@rosdahl.net>2022-10-16 10:50:09 +0200
commit7d679310cca01190d25786b79eacd19e052e4de0 (patch)
treea58e0508096afab03ed093b7a77650beb3f18097
parentda10b8f28122209ab3f986689ac024acb8643e36 (diff)
downloadccache-7d679310cca01190d25786b79eacd19e052e4de0.tar.gz
doc: Tweak manual and comments related to /showIncludes
-rw-r--r--doc/MANUAL.adoc14
-rw-r--r--src/ArgsInfo.hpp2
-rw-r--r--src/ccache.cpp2
-rw-r--r--src/core/ShowIncludesParser.cpp6
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:
* <<config_depend_mode,*depend_mode*>> is false.
* <<config_run_second_cpp,*run_second_cpp*>> 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<Digest>
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<std::string_view>
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> <spaces> <file>', 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 "<prefix> <spaces> <file>" where the prefix is "Note:
+ // including file:" in English but can be localized.
std::vector<std::string_view> result;
// This will split at each \r or \n, but that simply means there will be empty