The icecc
class supports
Icecream, which
facilitates taking compile jobs and distributing them among remote
machines.
The class stages directories with symlinks from gcc
and g++
to icecc
, for both
native and cross compilers.
Depending on each configure or compile, the OpenEmbedded build system
adds the directories at the head of the PATH
list
and then sets the ICECC_CXX
and
ICEC_CC
variables, which are the paths to the
g++
and gcc
compilers,
respectively.
For the cross compiler, the class creates a tar.gz
file that contains the Yocto Project toolchain and sets
ICECC_VERSION
, which is the version of the
cross-compiler used in the cross-development toolchain, accordingly.
The class handles all three different compile stages
(i.e native ,cross-kernel and target) and creates the necessary
environment tar.gz
file to be used by the remote
machines.
The class also supports SDK generation.
If ICECC_PATH
is not set in your local.conf
file, then the
class tries to locate the icecc
binary
using which
.
If
ICECC_ENV_EXEC
is set in your local.conf
file, the variable should
point to the icecc-create-env
script
provided by the user.
If you do not point to a user-provided script, the build system
uses the default script provided by the recipe
icecc-create-env-native.bb
.
icecc
.
If you do not want the Icecream distributed compile support to apply
to specific recipes or classes, you can effectively "blacklist" them
by listing the recipes and classes using the
ICECC_USER_PACKAGE_BL
and
ICECC_USER_CLASS_BL
,
variables, respectively, in your local.conf
file.
Doing so causes the OpenEmbedded build system to handle these
compilations locally.
Additionally, you can list recipes using the
ICECC_USER_PACKAGE_WL
variable in your local.conf
file to force
icecc
to be enabled for recipes using an empty
PARALLEL_MAKE
variable.
Inheriting the icecc
class changes all sstate
signatures.
Consequently, if a development team has a dedicated build system
that populates
STATE_MIRRORS
and they want to reuse sstate from
STATE_MIRRORS
, then all developers and the
build system need to either inherit the icecc
class or nobody should.
At the distribution level, you can inherit the
icecc
class to be sure that all builders start
with the same sstate signatures.
After inheriting the class, you can then disable the feature by setting
the
ICECC_DISABLED
variable to "1" as follows:
INHERIT_DISTRO_append = " icecc" ICECC_DISABLED ??= "1"
This practice makes sure everyone is using the same signatures but also
requires individuals that do want to use Icecream to enable the feature
individually as follows in your local.conf
file:
ICECC_DISABLED = ""