Detect when icecream is in use
Categories
(Firefox Build System :: General, enhancement)
Tracking
(firefox67 fixed)
| Tracking | Status | |
|---|---|---|
| firefox67 | --- | fixed |
People
(Reporter: ted, Assigned: ted)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Updated•7 years ago
|
| Assignee | ||
Comment 1•7 years ago
|
||
The MDN docs (that presumably people are using) show two methods of using icecream:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Using_Icecream
- Using the icecc wrappers as CC/CXX:
CC="/usr/lib/icecc/bin/cc"
CXX="/usr/lib/icecc/bin/c++"
- Using icecream+ccache, setting
CCACHE_PREFIX:
mk_add_options 'export CCACHE_PREFIX=icecc'
export CC=clang
export CXX=clang++
ac_add_options --with-ccache
For the former case it's a little tricky but those wrappers are symlinks to the icecc binary:
$ readlink /usr/lib/icecc/bin/cc
../../../bin/icecc
$(realpath /usr/lib/icecc/bin/cc) --version
ICECC 1.1
So it should be sufficient to check in configure "is CC a symlink to a binary named icecc?" To be thorough we could then invoke the symlink target with --version to see if it reports itself as ICECC.
For the latter case we should be able to look for CCACHE_PREFIX=icecc in the results of mozconfig evaluation.
| Assignee | ||
Comment 2•7 years ago
|
||
| Assignee | ||
Comment 3•7 years ago
|
||
This patch adds detection for when icecream is in use to build telemetry.
icecream is commonly enabled in two ways: by either setting CC/CXX to point
to icecream's cc/c++ symlinks, or by setting adding
mk_add_options 'export CCACHE_PREFIX=icecc' to a mozconfig when also using
ccache. For the former, this patch adds a simple configure check to see
if CC is a symlink to a file named 'icecc'. For the latter the telemetry
code simply looks for any mk_add_options lines from the mozconfig
containing that setting.
A simple test for the mozconfig version is added, but we don't currently
have a facility for writing telemetry tests that depend on configure values.
Local manual testing shows that it does work as expected.
Updated•7 years ago
|
| Assignee | ||
Comment 4•7 years ago
|
||
| Assignee | ||
Comment 5•7 years ago
|
||
(In reply to Ted Mielczarek [:ted] [:ted.mielczarek] from comment #4)
https://treeherder.mozilla.org/#/
jobs?repo=try&revision=06d4cf7f4ef00f410f1aaa49f512d198d8743075
The results on Try look a mess because of infra issues, but the builds that didn't hit those seem fine.
Comment 7•7 years ago
|
||
| bugherder | ||
| Assignee | ||
Comment 8•7 years ago
|
||
Here's a quick query that just shows the count of users using icecream:
https://sql.telemetry.mozilla.org/queries/61806/source#159003
Currently showing 26 unique clients.
Description
•