summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJoel Rosdahl <joel@rosdahl.net>2019-12-29 19:21:39 +0100
committerJoel Rosdahl <joel@rosdahl.net>2020-01-05 20:14:28 +0100
commit0774bfe4c71b342822170057df0aef15d371d892 (patch)
tree3bff54950cba44098c616455c7021aedcf91318e /doc
parentb26039a1350e8adcc793cbee2a02ecb1f3bdfe71 (diff)
downloadccache-0774bfe4c71b342822170057df0aef15d371d892.tar.gz
Remove the unify mode
The unify mode has not received enough attention and has at least these bugs: 1. The direct mode doesn’t work if the unify mode is enabled. This is because the unify mode doesn’t call into process_preprocessed_file which stores the paths and hashes of included files needed by the direct mode. 2. The .incbin directive detection has no effect when using the unify mode. This is again because the unify mode doesn’t use process_preprocessed_file which is where the .incbin detection takes place. 3. The unifier’s tokenizer doesn’t understand C++11 raw string literals. 4. The unifier ignores comments, but comments may have semantic meaning to modern compilers, e.g. “fall through” comments. Bugs 3 and 4 are fixable by improving the unifier’s tokenization algorithm, but since it’s a bit tricky it likely won’t be worth the effort, especially not as a bug fix. Bugs 1 and 2 are also fixable by unifying the two code paths, but that’s a non-trivial effort. In addition to the bugs, I believe that the usefullness of the unify mode is low: * It’s only applicable when not using -g. * It won't be enabled for C++ unless somebody fixes bug 3. * It can make line numbers in warning messages and __LINE__ expansions incorrect. * Since comments should not be ignored, the unify mode can only make a difference for some types of whitespace changes, like adding or removing blank lines or changing a+b to a + b. (a + b is already normalized to a + b by the preprocessor.) Therefore I’ll just remove the unify mode to fix the bugs. Fixes #497. (cherry picked from commit 947a72ce3712a6901e7ddc43a50c5df40739113e)
Diffstat (limited to 'doc')
-rw-r--r--doc/MANUAL.adoc13
1 files changed, 0 insertions, 13 deletions
diff --git a/doc/MANUAL.adoc b/doc/MANUAL.adoc
index e4af9982..b9820e0f 100644
--- a/doc/MANUAL.adoc
+++ b/doc/MANUAL.adoc
@@ -704,18 +704,6 @@ NOTE: In previous versions of ccache, *CCACHE_TEMPDIR* had to be on the same
with other users. Note that this also affects the file permissions set on
the object files created from your compilations.
-[[config_unify]] *unify* (*CCACHE_UNIFY* or *CCACHE_NOUNIFY*, see <<_boolean_values,Boolean values>> above)::
-
- If true, ccache will use a C/C++ unifier when hashing the preprocessor
- output if the *-g* option is not used. The unifier is slower than a normal
- hash, so setting this environment variable loses a little bit of speed, but
- it means that ccache can take advantage of not recompiling when the changes
- to the source code consist of reformatting only. Note that enabling the
- unifier changes the hash, so cached compilations produced when the unifier
- is enabled cannot be reused when the unifier is disabled, and vice versa.
- Enabling the unifier may result in incorrect line number information in
- compiler warning messages and expansions of the `__LINE__` macro.
-
Cache size management
---------------------
@@ -1073,7 +1061,6 @@ The depend mode will be disabled if any of the following holds:
* the configuration setting <<config_depend_mode,*depend_mode*>> is false
* the configuration setting <<config_run_second_cpp,*run_second_cpp*>> is false
-* the configuration setting <<config_unify,*unify*>> is true
* the compiler is not generating dependencies using *-MD* or *-MMD*