As of r323633, this bit started controlling whether symbol definitions
appear in object files, and is also became sensitive to the prevailing
bit, so it needs to be included in the key.
Details
Diff Detail
- Build Status
Buildable 14787 Build 14787: arc lint + arc unit
Event Timeline
Wondering whether there is a better way of proactively catching these issues - I assume it is currently ultimately detected through either linker failures or even worse, runtime failures. The only fully automated idea I have come up with is to have a debugging mode where we would force a native object to be produced even for cache hits, and would assert that the new and old objects are identical. Since that is expensive, the question would be how to run that broadly enough to catch bugs like this quickly, before it reaches the wild. Since the LLVM revision is used in the key, it would have to be using the same clang to build something large enough but at either different source revisions or with different enough options.
Any other possibilities?
Generally in Chromium these types of bugs have resulted in cache entries being incorrectly shared between targets (i.e. executables or DSOs, not target architectures). In the past I have tried to identify them by giving each target its own cache directory, building all the targets in the project and using "diff" to identify files with identical keys but different content. I would imagine that that could be relatively easily automated given a project willing to support that configuration (perhaps Chromium would be a good candidate). The advantages are that it would not require compiler support and it would allow the names of the mismatching targets to be easily reported. The disadvantage is that it would require more disk space (which could be a problem for projects such as Chromium with a large number of targets) but perhaps it wouldn't be a problem in practice if we disable debug info.