Closed Bug 1685034 Opened 5 years ago Closed 5 years ago

Avoid sccache hits after clang updates with patches that don't alter the clang binary itself

Categories

(Firefox Build System :: Toolchains, task)

task

Tracking

(firefox86 fixed)

RESOLVED FIXED
86 Branch
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)

Yeah, in many ways the task id is actually easier. (it's also shorter)

Assignee: nobody → mh+mozilla
Keywords: leave-open

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.

Attachment #9195571 - Attachment description: Bug 1685034 - Patch clang to add the task-id it was produced from in its version. → Bug 1685034 - Add the task-id to the clang version.
Pushed by mh@glandium.org: https://hg.mozilla.org/integration/autoland/rev/11810f926917 Add the task-id to the clang version. r=dmajor
Keywords: leave-open
Pushed by mh@glandium.org: https://hg.mozilla.org/integration/autoland/rev/f79c3e294cea Upgrade sccache to 0.2.15. r=firefox-build-system-reviewers,andi,mhentges
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: