blob: 7d94525d3169e2b58a47290e9585360b8abf8ebf [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001# IceCream distributed compiling support
2#
3# Stages directories with symlinks from gcc/g++ to icecc, for both
4# native and cross compilers. Depending on each configure or compile,
5# the directories are added at the head of the PATH list and ICECC_CXX
6# and ICEC_CC are set.
7#
8# For the cross compiler, creates a tar.gz of our toolchain and sets
9# ICECC_VERSION accordingly.
10#
11# The class now handles all 3 different compile 'stages' (i.e native ,cross-kernel and target) creating the
12# necessary environment tar.gz file to be used by the remote machines.
13# It also supports meta-toolchain generation
14#
15# If ICECC_PATH is not set in local.conf then the class will try to locate it using 'bb.utils.which'
16# but nothing is sure ;)
17#
18# If ICECC_ENV_EXEC is set in local.conf, then it should point to the icecc-create-env script provided by the user
19# or the default one provided by icecc-create-env.bb will be used
20# (NOTE that this is a modified version of the script need it and *not the one that comes with icecc*
21#
22# User can specify if specific packages or packages belonging to class should not use icecc to distribute
23# compile jobs to remote machines, but handled locally, by defining ICECC_USER_CLASS_BL and ICECC_USER_PACKAGE_BL
24# with the appropriate values in local.conf. In addition the user can force to enable icecc for packages
25# which set an empty PARALLEL_MAKE variable by defining ICECC_USER_PACKAGE_WL.
26#
27#########################################################################################
28#Error checking is kept to minimum so double check any parameters you pass to the class
29###########################################################################################
30
Brad Bishop316dfdd2018-06-25 12:45:53 -040031BB_HASHBASE_WHITELIST += "ICECC_PARALLEL_MAKE ICECC_DISABLED ICECC_USER_PACKAGE_BL \
32 ICECC_USER_CLASS_BL ICECC_USER_PACKAGE_WL ICECC_PATH ICECC_ENV_EXEC \
33 ICECC_CARET_WORKAROUND ICECC_CFLAGS ICECC_ENV_VERSION \
34 ICECC_DEBUG ICECC_LOGFILE ICECC_REPEAT_RATE ICECC_PREFERRED_HOST \
35 ICECC_CLANG_REMOTE_CPP ICECC_IGNORE_UNVERIFIED ICECC_TEST_SOCKET \
Brad Bishopa5c52ff2018-11-23 10:55:50 +130036 ICECC_ENV_DEBUG ICECC_SYSTEM_PACKAGE_BL ICECC_SYSTEM_CLASS_BL \
Brad Bishop316dfdd2018-06-25 12:45:53 -040037 "
Patrick Williamsc124f4f2015-09-15 14:41:29 -050038
39ICECC_ENV_EXEC ?= "${STAGING_BINDIR_NATIVE}/icecc-create-env"
40
Brad Bishop977dc1a2019-02-06 16:01:43 -050041HOSTTOOLS_NONFATAL += "icecc patchelf"
42
Brad Bishop316dfdd2018-06-25 12:45:53 -040043# This version can be incremented when changes are made to the environment that
44# invalidate the version on the compile nodes. Changing it will cause a new
45# environment to be created.
46#
47# A useful thing to do for testing Icecream changes locally is to add a
48# subversion in local.conf:
49# ICECC_ENV_VERSION_append = "-my-ver-1"
50ICECC_ENV_VERSION = "2"
51
52# Default to disabling the caret workaround, If set to "1" in local.conf, icecc
53# will locally recompile any files that have warnings, which can adversely
54# affect performance.
55#
56# See: https://github.com/icecc/icecream/issues/190
57export ICECC_CARET_WORKAROUND ??= "0"
58
59ICECC_CFLAGS = ""
60CFLAGS += "${ICECC_CFLAGS}"
61CXXFLAGS += "${ICECC_CFLAGS}"
62
63# Debug flags when generating environments
64ICECC_ENV_DEBUG ??= ""
65
Brad Bishopa5c52ff2018-11-23 10:55:50 +130066# "system" recipe blacklist contains a list of packages that can not distribute
67# compile tasks for one reason or the other. When adding new entry, please
68# document why (how it failed) so that we can re-evaluate it later e.g. when
69# there is new version
70#
71# libgcc-initial - fails with CPP sanity check error if host sysroot contains
72# cross gcc built for another target tune/variant
73# target-sdk-provides-dummy - ${HOST_PREFIX} is empty which triggers the "NULL
74# prefix" error.
75ICECC_SYSTEM_PACKAGE_BL += "\
76 libgcc-initial \
77 target-sdk-provides-dummy \
78 "
79
80# "system" classes that should be blacklisted. When adding new entry, please
81# document why (how it failed) so that we can re-evaluate it later
82#
83# image - Image aren't compiling, but the testing framework for images captures
84# PARALLEL_MAKE as part of the test environment. Many tests won't use
85# icecream, but leaving the high level of parallelism can cause them to
86# consume an unnecessary amount of resources.
87ICECC_SYSTEM_CLASS_BL += "\
88 image \
89 "
90
Patrick Williamsc124f4f2015-09-15 14:41:29 -050091def icecc_dep_prepend(d):
92 # INHIBIT_DEFAULT_DEPS doesn't apply to the patch command. Whether or not
93 # we need that built is the responsibility of the patch function / class, not
94 # the application.
Brad Bishop316dfdd2018-06-25 12:45:53 -040095 if not d.getVar('INHIBIT_DEFAULT_DEPS'):
Patrick Williamsc124f4f2015-09-15 14:41:29 -050096 return "icecc-create-env-native"
97 return ""
98
99DEPENDS_prepend += "${@icecc_dep_prepend(d)} "
100
Brad Bishop37a0e4d2017-12-04 01:01:44 -0500101get_cross_kernel_cc[vardepsexclude] += "KERNEL_CC"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500102def get_cross_kernel_cc(bb,d):
Brad Bishop977dc1a2019-02-06 16:01:43 -0500103 if not icecc_is_kernel(bb, d):
104 return None
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500105
106 # evaluate the expression by the shell if necessary
Brad Bishop977dc1a2019-02-06 16:01:43 -0500107 kernel_cc = d.getVar('KERNEL_CC')
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500108 if '`' in kernel_cc or '$(' in kernel_cc:
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600109 import subprocess
110 kernel_cc = subprocess.check_output("echo %s" % kernel_cc, shell=True).decode("utf-8")[:-1]
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500111
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500112 kernel_cc = kernel_cc.replace('ccache', '').strip()
113 kernel_cc = kernel_cc.split(' ')[0]
114 kernel_cc = kernel_cc.strip()
115 return kernel_cc
116
117def get_icecc(d):
Brad Bishop316dfdd2018-06-25 12:45:53 -0400118 return d.getVar('ICECC_PATH') or bb.utils.which(os.getenv("PATH"), "icecc")
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500119
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500120def use_icecc(bb,d):
Brad Bishop316dfdd2018-06-25 12:45:53 -0400121 if d.getVar('ICECC_DISABLED') == "1":
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500122 # don't even try it, when explicitly disabled
123 return "no"
124
125 # allarch recipes don't use compiler
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500126 if icecc_is_allarch(bb, d):
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500127 return "no"
128
Brad Bishop316dfdd2018-06-25 12:45:53 -0400129 if icecc_is_cross_canadian(bb, d):
130 return "no"
131
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500132 pn = d.getVar('PN')
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500133
Brad Bishopa5c52ff2018-11-23 10:55:50 +1300134 system_class_blacklist = (d.getVar('ICECC_SYSTEM_CLASS_BL') or "").split()
Brad Bishop316dfdd2018-06-25 12:45:53 -0400135 user_class_blacklist = (d.getVar('ICECC_USER_CLASS_BL') or "none").split()
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500136 package_class_blacklist = system_class_blacklist + user_class_blacklist
137
138 for black in package_class_blacklist:
139 if bb.data.inherits_class(black, d):
140 bb.debug(1, "%s: class %s found in blacklist, disable icecc" % (pn, black))
141 return "no"
142
Brad Bishopa5c52ff2018-11-23 10:55:50 +1300143 system_package_blacklist = (d.getVar('ICECC_SYSTEM_PACKAGE_BL') or "").split()
Brad Bishop316dfdd2018-06-25 12:45:53 -0400144 user_package_blacklist = (d.getVar('ICECC_USER_PACKAGE_BL') or "").split()
145 user_package_whitelist = (d.getVar('ICECC_USER_PACKAGE_WL') or "").split()
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500146 package_blacklist = system_package_blacklist + user_package_blacklist
147
148 if pn in package_blacklist:
149 bb.debug(1, "%s: found in blacklist, disable icecc" % pn)
150 return "no"
151
152 if pn in user_package_whitelist:
153 bb.debug(1, "%s: found in whitelist, enable icecc" % pn)
154 return "yes"
155
Brad Bishop316dfdd2018-06-25 12:45:53 -0400156 if d.getVar('PARALLEL_MAKE') == "":
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500157 bb.debug(1, "%s: has empty PARALLEL_MAKE, disable icecc" % pn)
158 return "no"
159
160 return "yes"
161
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500162def icecc_is_allarch(bb, d):
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800163 return d.getVar("PACKAGE_ARCH") == "all"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500164
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500165def icecc_is_kernel(bb, d):
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500166 return \
167 bb.data.inherits_class("kernel", d);
168
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500169def icecc_is_native(bb, d):
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500170 return \
171 bb.data.inherits_class("cross", d) or \
172 bb.data.inherits_class("native", d);
173
Brad Bishop316dfdd2018-06-25 12:45:53 -0400174def icecc_is_cross_canadian(bb, d):
175 return bb.data.inherits_class("cross-canadian", d)
176
177def icecc_dir(bb, d):
178 return d.expand('${TMPDIR}/work-shared/ice')
179
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500180# Don't pollute allarch signatures with TARGET_FPU
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500181icecc_version[vardepsexclude] += "TARGET_FPU"
182def icecc_version(bb, d):
183 if use_icecc(bb, d) == "no":
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500184 return ""
185
Brad Bishop316dfdd2018-06-25 12:45:53 -0400186 parallel = d.getVar('ICECC_PARALLEL_MAKE') or ""
187 if not d.getVar('PARALLEL_MAKE') == "" and parallel:
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500188 d.setVar("PARALLEL_MAKE", parallel)
189
Brad Bishop316dfdd2018-06-25 12:45:53 -0400190 # Disable showing the caret in the GCC compiler output if the workaround is
191 # disabled
192 if d.getVar('ICECC_CARET_WORKAROUND') == '0':
193 d.setVar('ICECC_CFLAGS', '-fno-diagnostics-show-caret')
194
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500195 if icecc_is_native(bb, d):
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500196 archive_name = "local-host-env"
197 elif d.expand('${HOST_PREFIX}') == "":
198 bb.fatal(d.expand("${PN}"), " NULL prefix")
199 else:
200 prefix = d.expand('${HOST_PREFIX}' )
201 distro = d.expand('${DISTRO}')
202 target_sys = d.expand('${TARGET_SYS}')
Brad Bishop316dfdd2018-06-25 12:45:53 -0400203 float = d.getVar('TARGET_FPU') or "hard"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500204 archive_name = prefix + distro + "-" + target_sys + "-" + float
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500205 if icecc_is_kernel(bb, d):
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500206 archive_name += "-kernel"
207
208 import socket
Brad Bishop316dfdd2018-06-25 12:45:53 -0400209 ice_dir = icecc_dir(bb, d)
210 tar_file = os.path.join(ice_dir, "{archive}-{version}-@VERSION@-{hostname}.tar.gz".format(
211 archive=archive_name,
212 version=d.getVar('ICECC_ENV_VERSION'),
213 hostname=socket.gethostname()
214 ))
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500215
216 return tar_file
217
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500218def icecc_path(bb,d):
219 if use_icecc(bb, d) == "no":
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500220 # don't create unnecessary directories when icecc is disabled
221 return
222
Brad Bishop977dc1a2019-02-06 16:01:43 -0500223 staging = os.path.join(d.expand('${STAGING_BINDIR}'), "ice")
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500224 if icecc_is_kernel(bb, d):
Brad Bishop977dc1a2019-02-06 16:01:43 -0500225 staging += "-kernel"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500226
Brad Bishop977dc1a2019-02-06 16:01:43 -0500227 return staging
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500228
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500229def icecc_get_external_tool(bb, d, tool):
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500230 external_toolchain_bindir = d.expand('${EXTERNAL_TOOLCHAIN}${bindir_cross}')
231 target_prefix = d.expand('${TARGET_PREFIX}')
232 return os.path.join(external_toolchain_bindir, '%s%s' % (target_prefix, tool))
233
Brad Bishop316dfdd2018-06-25 12:45:53 -0400234def icecc_get_tool_link(tool, d):
235 import subprocess
236 return subprocess.check_output("readlink -f %s" % tool, shell=True).decode("utf-8")[:-1]
237
238def icecc_get_path_tool(tool, d):
239 # This is a little ugly, but we want to make sure we add an actual
240 # compiler to the toolchain, not ccache. Some distros (e.g. Fedora)
241 # have ccache enabled by default using symlinks PATH, meaning ccache
242 # would be found first when looking for the compiler.
243 paths = os.getenv("PATH").split(':')
244 while True:
245 p, hist = bb.utils.which(':'.join(paths), tool, history=True)
246 if not p or os.path.basename(icecc_get_tool_link(p, d)) != 'ccache':
247 return p
248 paths = paths[len(hist):]
249
250 return ""
251
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500252# Don't pollute native signatures with target TUNE_PKGARCH through STAGING_BINDIR_TOOLCHAIN
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500253icecc_get_tool[vardepsexclude] += "STAGING_BINDIR_TOOLCHAIN"
254def icecc_get_tool(bb, d, tool):
255 if icecc_is_native(bb, d):
Brad Bishop316dfdd2018-06-25 12:45:53 -0400256 return icecc_get_path_tool(tool, d)
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500257 elif icecc_is_kernel(bb, d):
Brad Bishop316dfdd2018-06-25 12:45:53 -0400258 return icecc_get_path_tool(get_cross_kernel_cc(bb, d), d)
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500259 else:
260 ice_dir = d.expand('${STAGING_BINDIR_TOOLCHAIN}')
261 target_sys = d.expand('${TARGET_SYS}')
Brad Bishop316dfdd2018-06-25 12:45:53 -0400262 for p in ice_dir.split(':'):
263 tool_bin = os.path.join(p, "%s-%s" % (target_sys, tool))
264 if os.path.isfile(tool_bin):
265 return tool_bin
266 external_tool_bin = icecc_get_external_tool(bb, d, tool)
267 if os.path.isfile(external_tool_bin):
268 return external_tool_bin
269 return ""
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500270
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500271def icecc_get_and_check_tool(bb, d, tool):
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500272 # Check that g++ or gcc is not a symbolic link to icecc binary in
273 # PATH or icecc-create-env script will silently create an invalid
274 # compiler environment package.
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500275 t = icecc_get_tool(bb, d, tool)
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600276 if t:
Brad Bishop977dc1a2019-02-06 16:01:43 -0500277 link_path = icecc_get_tool_link(t, d)
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600278 if link_path == get_icecc(d):
Brad Bishop977dc1a2019-02-06 16:01:43 -0500279 bb.error("%s is a symlink to %s in PATH and this prevents icecc from working" % (t, link_path))
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600280 return ""
281 else:
282 return t
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500283 else:
284 return t
285
286wait_for_file() {
287 local TIME_ELAPSED=0
288 local FILE_TO_TEST=$1
289 local TIMEOUT=$2
290 until [ -f "$FILE_TO_TEST" ]
291 do
292 TIME_ELAPSED=`expr $TIME_ELAPSED + 1`
293 if [ $TIME_ELAPSED -gt $TIMEOUT ]
294 then
295 return 1
296 fi
297 sleep 1
298 done
299}
300
301def set_icecc_env():
302 # dummy python version of set_icecc_env
303 return
304
305set_icecc_env() {
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500306 if [ "${@use_icecc(bb, d)}" = "no" ]
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500307 then
308 return
309 fi
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500310 ICECC_VERSION="${@icecc_version(bb, d)}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500311 if [ "x${ICECC_VERSION}" = "x" ]
312 then
313 bbwarn "Cannot use icecc: could not get ICECC_VERSION"
314 return
315 fi
316
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500317 ICE_PATH="${@icecc_path(bb, d)}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500318 if [ "x${ICE_PATH}" = "x" ]
319 then
320 bbwarn "Cannot use icecc: could not get ICE_PATH"
321 return
322 fi
323
Brad Bishop977dc1a2019-02-06 16:01:43 -0500324 ICECC_BIN="${@get_icecc(d)}"
325 if [ -z "${ICECC_BIN}" ]; then
326 bbwarn "Cannot use icecc: icecc binary not found"
327 return
328 fi
329 if [ -z "$(which patchelf patchelf-uninative)" ]; then
330 bbwarn "Cannot use icecc: patchelf not found"
331 return
332 fi
333
334 # Create symlinks to icecc in the recipe-sysroot directory
335 mkdir -p ${ICE_PATH}
336 if [ -n "${KERNEL_CC}" ]; then
337 compilers="${@get_cross_kernel_cc(bb,d)}"
338 else
339 compilers="${HOST_PREFIX}gcc ${HOST_PREFIX}g++"
340 fi
341 for compiler in $compilers; do
342 ln -sf ${ICECC_BIN} ${ICE_PATH}/$compiler
343 done
344
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500345 ICECC_CC="${@icecc_get_and_check_tool(bb, d, "gcc")}"
346 ICECC_CXX="${@icecc_get_and_check_tool(bb, d, "g++")}"
347 # cannot use icecc_get_and_check_tool here because it assumes as without target_sys prefix
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500348 ICECC_WHICH_AS="${@bb.utils.which(os.getenv('PATH'), 'as')}"
349 if [ ! -x "${ICECC_CC}" -o ! -x "${ICECC_CXX}" ]
350 then
351 bbwarn "Cannot use icecc: could not get ICECC_CC or ICECC_CXX"
352 return
353 fi
354
355 ICE_VERSION=`$ICECC_CC -dumpversion`
356 ICECC_VERSION=`echo ${ICECC_VERSION} | sed -e "s/@VERSION@/$ICE_VERSION/g"`
357 if [ ! -x "${ICECC_ENV_EXEC}" ]
358 then
359 bbwarn "Cannot use icecc: invalid ICECC_ENV_EXEC"
360 return
361 fi
362
363 ICECC_AS="`${ICECC_CC} -print-prog-name=as`"
364 # for target recipes should return something like:
365 # /OE/tmp-eglibc/sysroots/x86_64-linux/usr/libexec/arm920tt-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/4.8.2/as
366 # and just "as" for native, if it returns "as" in current directory (for whatever reason) use "as" from PATH
367 if [ "`dirname "${ICECC_AS}"`" = "." ]
368 then
369 ICECC_AS="${ICECC_WHICH_AS}"
370 fi
371
372 if [ ! -f "${ICECC_VERSION}.done" ]
373 then
374 mkdir -p "`dirname "${ICECC_VERSION}"`"
375
376 # the ICECC_VERSION generation step must be locked by a mutex
377 # in order to prevent race conditions
378 if flock -n "${ICECC_VERSION}.lock" \
Brad Bishop316dfdd2018-06-25 12:45:53 -0400379 ${ICECC_ENV_EXEC} ${ICECC_ENV_DEBUG} "${ICECC_CC}" "${ICECC_CXX}" "${ICECC_AS}" "${ICECC_VERSION}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500380 then
381 touch "${ICECC_VERSION}.done"
Brad Bishop977dc1a2019-02-06 16:01:43 -0500382 elif ! wait_for_file "${ICECC_VERSION}.done" 30
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500383 then
384 # locking failed so wait for ${ICECC_VERSION}.done to appear
385 bbwarn "Timeout waiting for ${ICECC_VERSION}.done"
386 return
387 fi
388 fi
389
Brad Bishop316dfdd2018-06-25 12:45:53 -0400390 # Don't let ccache find the icecream compiler links that have been created, otherwise
391 # it can end up invoking icecream recursively.
392 export CCACHE_PATH="$PATH"
Brad Bishopa5c52ff2018-11-23 10:55:50 +1300393 export CCACHE_DISABLE="1"
Brad Bishop316dfdd2018-06-25 12:45:53 -0400394
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500395 export ICECC_VERSION ICECC_CC ICECC_CXX
396 export PATH="$ICE_PATH:$PATH"
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500397
398 bbnote "Using icecc"
399}
400
401do_configure_prepend() {
402 set_icecc_env
403}
404
405do_compile_prepend() {
406 set_icecc_env
407}
408
409do_compile_kernelmodules_prepend() {
410 set_icecc_env
411}
412
413do_install_prepend() {
414 set_icecc_env
415}
Brad Bishop316dfdd2018-06-25 12:45:53 -0400416
417# IceCream is not (currently) supported in the extensible SDK
418ICECC_SDK_HOST_TASK = "nativesdk-icecc-toolchain"
419ICECC_SDK_HOST_TASK_task-populate-sdk-ext = ""
420
421# Don't include IceCream in uninative tarball
422ICECC_SDK_HOST_TASK_pn-uninative-tarball = ""
423
424# Add the toolchain scripts to the SDK
425TOOLCHAIN_HOST_TASK_append = " ${ICECC_SDK_HOST_TASK}"