Avoid sccache hits after clang updates with patches that don't alter the clang binary itself
Categories
(Firefox Build System :: Toolchains, task)
Tracking
(firefox86 fixed)
Tracking | Status | |
---|---|---|
firefox86 | --- | fixed |
People
(Reporter: glandium, Assigned: glandium)
Details
Attachments
(2 files)
See e.g. bug 1588710 for an example of unexpected consequences with a patch that modified clang in a way that should alter the result of the build, but doesn't because of sccache.
Off the top of my head, a solution to this problem would be to
a) make sccache add the contents of the __VERSION__
preprocessor variable to its hash of the compiler (as sccache already invokes the preprocessor, it's a negligible overhead)
b) alter our clang build so that the __VERSION__
preprocessor variable contains something that changes when we have a new build of clang. The hash that is used in the taskcluster index would make sense for that. And it could be added via the CLANG_REVISION
define when building clang.
(In reply to Mike Hommey [:glandium] from comment #0)
The hash that is used in the taskcluster index would make sense for that.
Is there an easy way to take such a hash and map it back to the task ID that ran build-clang? Alternatively, could we use the task ID as the version tag? I've occasionally wanted the ability to take someone's version string and pull up the corresponding build-clang task, in order to look at its logs or download the artifact. (This would be useful on Windows too where we don't have the shared library problem)
Assignee | ||
Comment 2•5 years ago
|
||
Yeah, in many ways the task id is actually easier. (it's also shorter)
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 3•5 years ago
|
||
We hack the clang build system so that the task-id is used for e.g.
CLANG_REVISION, which ends up in e.g. the output of clang --version
.
Note that we don't bother with older versions of clang.
Updated•5 years ago
|
Comment 5•5 years ago
|
||
bugherder |
Assignee | ||
Comment 6•5 years ago
|
||
The new release contains https://github.com/mozilla/sccache/pull/922
Assignee | ||
Updated•5 years ago
|
Comment 8•5 years ago
|
||
bugherder |
Comment 9•5 years ago
|
||
bugherder |
Description
•