mirror of
https://git.yoctoproject.org/poky
synced 2026-05-09 05:29:32 +00:00
icecc.bbclass: properly handle disabling of icecc
Always use use_icc to check if IceCC should be enabled. Move ICECC_DISABLED variable checking to use_icc function. Also while we are at it, fix condition in icc_is_allarch function. (From OE-Core rev: 20b0168da47d6e30fcbaf6adab3bde0d398d0d00) Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
db2255dc0b
commit
c2c4579c49
@@ -91,6 +91,10 @@ def create_path(compilers, bb, d):
|
|||||||
return staging
|
return staging
|
||||||
|
|
||||||
def use_icc(bb,d):
|
def use_icc(bb,d):
|
||||||
|
if d.getVar('ICECC_DISABLED') == "1":
|
||||||
|
# don't even try it, when explicitly disabled
|
||||||
|
return "no"
|
||||||
|
|
||||||
# allarch recipes don't use compiler
|
# allarch recipes don't use compiler
|
||||||
if icc_is_allarch(bb, d):
|
if icc_is_allarch(bb, d):
|
||||||
return "no"
|
return "no"
|
||||||
@@ -133,8 +137,7 @@ def use_icc(bb,d):
|
|||||||
return "yes"
|
return "yes"
|
||||||
|
|
||||||
def icc_is_allarch(bb, d):
|
def icc_is_allarch(bb, d):
|
||||||
return \
|
return d.getVar("PACKAGE_ARCH") == "all"
|
||||||
bb.data.inherits_class("allarch", d);
|
|
||||||
|
|
||||||
def icc_is_kernel(bb, d):
|
def icc_is_kernel(bb, d):
|
||||||
return \
|
return \
|
||||||
@@ -148,10 +151,6 @@ def icc_is_native(bb, d):
|
|||||||
# Don't pollute allarch signatures with TARGET_FPU
|
# Don't pollute allarch signatures with TARGET_FPU
|
||||||
icc_version[vardepsexclude] += "TARGET_FPU"
|
icc_version[vardepsexclude] += "TARGET_FPU"
|
||||||
def icc_version(bb, d):
|
def icc_version(bb, d):
|
||||||
if d.getVar('ICECC_DISABLED') == "1":
|
|
||||||
# don't even try it, when explicitly disabled
|
|
||||||
return ""
|
|
||||||
|
|
||||||
if use_icc(bb, d) == "no":
|
if use_icc(bb, d) == "no":
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
@@ -179,7 +178,7 @@ def icc_version(bb, d):
|
|||||||
return tar_file
|
return tar_file
|
||||||
|
|
||||||
def icc_path(bb,d):
|
def icc_path(bb,d):
|
||||||
if d.getVar('ICECC_DISABLED') == "1":
|
if use_icc(bb, d) == "no":
|
||||||
# don't create unnecessary directories when icecc is disabled
|
# don't create unnecessary directories when icecc is disabled
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -246,7 +245,7 @@ def set_icecc_env():
|
|||||||
return
|
return
|
||||||
|
|
||||||
set_icecc_env() {
|
set_icecc_env() {
|
||||||
if [ "${ICECC_DISABLED}" = "1" ]
|
if [ "${@use_icc(bb, d)}" = "no" ]
|
||||||
then
|
then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user