Joel Rosdahl [Sat, 5 Jan 2019 09:56:13 +0000 (10:56 +0100)]
Genererate confitem number fields in confitems.gperf
When merging diverging confitems.gperf changes it is always a hassle to
regenerate the config number sequence fields by hand, and they also
trigger merge conflicts. Those numbers are now instead generated
automatically.
Joel Rosdahl [Fri, 4 Jan 2019 08:54:29 +0000 (09:54 +0100)]
Don’t store pregenerated config lookup tables in the repo
We have had a requirement on gperf for the build-from-repo case for a
while now, so there is no real point in keeping generated gperf lookup
table code in the repository.
Joel Rosdahl [Thu, 3 Jan 2019 13:33:52 +0000 (14:33 +0100)]
Merge pull request #301 from afbjorklund/depend_mode
Add depend mode (avoid the preprocessor).
When using run_second_cpp (which is the default now), ccache executes
the preprocessor just to determine the object hash, and will do so for
every cache miss. While compiling, the same work is done again.
When executing a massively parallel build using ccache and distcc,
the system controlling the build can get a fairly high load because of
all these ccache-only preprocessor executions.
This is based on the work of Geert Kloosterman with remaining items addressed.
jonnyyu [Mon, 10 Dec 2018 19:49:22 +0000 (03:49 +0800)]
Skip '-index-store-path' when building with Xcode (#333)
In Xcode 9 or later, Xcode calls clang with this
new '-index-store-path' option.
The Xcode usually sets IndexStore directory under
a unique build location. This might break the manifest,
especially when cache is shared among multple machines.
jonnyyu [Sun, 9 Dec 2018 18:15:58 +0000 (02:15 +0800)]
Handle several levels of nonexistent directories in make_relative_path (#334)
Currently, ccache supports calculating relative path
for 1 level non-exist path. That is to say,
if the given path does not exist, however if its
parent directory exists, then ccache can calculate
the relative path correctly.
Unfortunately this doesn't fit the needs.
Xcode build system always adds these paths into header search path:
xxxxx/DerivedResources/x86-64
xxxxx/DerivedResources
these paths are build outputs for build rules.
For projects which doesn't use build rule to generate files
these directories do not exist.
So this change refine the logic of make_relative_path
to recursively go up find the nearest existing directory
and use the remaining path as path_suffix.
Joel Galenson [Sun, 2 Dec 2018 19:27:21 +0000 (11:27 -0800)]
Support multiple -fsanitize-blacklist arguments (#330)
This modifies the code to support multiple -fsanitize-blacklist
arguments, which prevents ccache from incorrectly using a cached
result when one of the blacklist files has changed.
Joel Rosdahl [Wed, 24 Oct 2018 20:10:41 +0000 (22:10 +0200)]
Use double for limit_multiple
This allows for removing the -Wno-double-promotion and
-Wno-float-conversion options which are not available for the clang
version currently used for “make analyze”.
Joel Rosdahl [Sat, 20 Oct 2018 20:42:55 +0000 (22:42 +0200)]
Refactor conf item lookup code
- Extracted parse/format/verify functions into a separate confitems.c
file.
- The *_lookup.c files are now compilation units of their own instead of
being included inside conf.c. This feels cleaner, and also relieves
cppcheck from having to check dirty, autogenerated code.
Joel Rosdahl [Sun, 7 Oct 2018 19:06:08 +0000 (21:06 +0200)]
Fix bugs in debug mode logging
Need to dump log buffer as the last exit function to not lose any logs.
Also, made sure to print the final result log line even if the log mode
isn’t enabled.
Joel Rosdahl [Sun, 7 Oct 2018 18:40:55 +0000 (20:40 +0200)]
Refactor debug mode code
Knowledge of the debug mode snuck into the mdfour struct and code, which
did not feel good.
* Introduced a new “struct hash”, which is used by the hash_* functions
instead of “struct mdfour”. “struct hash” contains the mdfour state
and also debug file handles that can be set via a new
hash_enable_debug function.
* Removed “identifier” from the mdfour struct and code.
* Introduced hash.h and all documented hash_* functions.
* Introduced unify.h.
* Removed some global state from util.c.