diff options
author | Anders F Björklund <anders.f.bjorklund@gmail.com> | 2017-06-25 20:41:24 +0200 |
---|---|---|
committer | Joel Rosdahl <joel@rosdahl.net> | 2018-01-30 21:37:20 +0100 |
commit | 8759215697ddec778b272b4d033484f591bd2f9f (patch) | |
tree | 9e2b1a6121977188720dfa4659d2e4b90069cffc /MANUAL.txt | |
parent | 267a881067bebe8dbc718dc72554c55e4a348c68 (diff) | |
download | ccache-8759215697ddec778b272b4d033484f591bd2f9f.tar.gz |
Handle semi-preprocessed source code with cpp1
When using gcc -fdirectives-only or clang -frewrite-includes,
we still need to pass preprocessor arguments to the compiler.
Also make sure to set the language for clang (but not for gcc),
since the file no longer contains regular preprocessed source.
Diffstat (limited to 'MANUAL.txt')
-rw-r--r-- | MANUAL.txt | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -485,6 +485,12 @@ of the original source code. This makes cache misses slightly faster since the source code only has to be preprocessed once. The downside is that some compilers won't produce the same result (for instance diagnostics warnings) when compiling preprocessed source code. ++ +An alternative to *run_second_cpp* is to use *-fdirectives-only* (for GCC) or +*-frewrite-includes* (for Clang). This will cause the compiler to leave the +macros and other preprocessor information, and only process the *#include* +directives. When run in this way, the preprocessor arguments will be passed +to the compiler since it still has to do _some_ preprocessing (like macros). *sloppiness* (*CCACHE_SLOPPINESS*):: |