ccache in CI
#13
(02-05-2016, 07:32 AM)bearbin Wrote: Can you guarantee that ccache will not fail when major changes are made to the code, and it won't carry over any state from old compilations?

If it won't then it's probably fine, but any type of caching adds opportunity for statefullness to creep in. The same build should be produced from fresh source as from the state in the buildserver.

Yes. This is guaranteed by design, ccache guarantees that the code will compile just as if ccache was not there at all. In other words, you should not worry about statefullness creeping in.

Quote:ccache has been carefully written to always produce exactly the same compiler output that you would get without the cache. The only way you should be able to tell that you are using ccache is the speed. Currently known exceptions to this goal are listed under BUGS. If you ever discover an undocumented case where ccache changes the output of your compiler, please let us know.

The exception to this "as-if-no-statefullness" principle are bugs. Currently there are two known bugs:

1. "ccache doesn’t handle the GNU Assembler’s .incbin directive correctly. This directive can be embedded in the source code inside an asm statement in order to include a file verbatim in the object file. If the included file is modified, ccache doesn’t pick up the change since the inclusion isn’t done by the preprocessor. A workaround of this problem is to set extra_files_to_hash to the path of the included file."

2. "There is a catch with the direct mode: header files that were used by the compiler are recorded, but header files that were not used, but would have been used if they existed, are not. So, when ccache checks if a result can be taken from the cache, it currently can’t check if the existence of a new header file should invalidate the result. In practice, the direct mode is safe to use in the absolute majority of cases."
Reply
Thanks given by:


Messages In This Thread
ccache in CI - by LogicParrot - 01-27-2016, 05:15 PM
RE: ccache in CI - by xoft - 01-27-2016, 09:13 PM
RE: ccache in CI - by LogicParrot - 01-28-2016, 01:07 AM
RE: ccache in CI - by LogicParrot - 01-28-2016, 01:49 AM
RE: ccache in CI - by LogicParrot - 01-28-2016, 03:04 AM
RE: ccache in CI - by worktycho - 01-28-2016, 04:35 AM
RE: ccache in CI - by LogicParrot - 01-28-2016, 06:22 AM
RE: ccache in CI - by worktycho - 01-28-2016, 08:14 AM
RE: ccache in CI - by LogicParrot - 02-04-2016, 07:13 AM
RE: ccache in CI - by bearbin - 02-05-2016, 05:29 AM
RE: ccache in CI - by LogicParrot - 02-05-2016, 06:03 AM
RE: ccache in CI - by bearbin - 02-05-2016, 07:32 AM
RE: ccache in CI - by LogicParrot - 02-05-2016, 08:20 AM
RE: ccache in CI - by LogicParrot - 02-05-2016, 09:38 PM
RE: ccache in CI - by bearbin - 02-06-2016, 02:32 AM
RE: ccache in CI - by bearbin - 02-06-2016, 02:56 AM
RE: ccache in CI - by LogicParrot - 02-06-2016, 04:02 AM
RE: ccache in CI - by bearbin - 02-06-2016, 04:58 AM
RE: ccache in CI - by LogicParrot - 02-06-2016, 08:26 AM
RE: ccache in CI - by bearbin - 02-06-2016, 07:07 PM
RE: ccache in CI - by bearbin - 02-06-2016, 09:13 PM
RE: ccache in CI - by LogicParrot - 02-07-2016, 01:34 AM
RE: ccache in CI - by bearbin - 02-07-2016, 02:56 AM
RE: ccache in CI - by LogicParrot - 02-07-2016, 08:19 AM
RE: ccache in CI - by bearbin - 02-07-2016, 07:49 PM
RE: ccache in CI - by LogicParrot - 02-07-2016, 08:45 PM
RE: ccache in CI - by bearbin - 02-08-2016, 03:05 AM
RE: ccache in CI - by LogicParrot - 02-08-2016, 04:50 AM
RE: ccache in CI - by bearbin - 02-14-2016, 01:34 AM
RE: ccache in CI - by LogicParrot - 02-14-2016, 06:10 PM
RE: ccache in CI - by bearbin - 02-14-2016, 10:08 PM
RE: ccache in CI - by LogicParrot - 02-14-2016, 11:22 PM



Users browsing this thread: 17 Guest(s)