summaryrefslogtreecommitdiffstats
path: root/meta/classes/icecc.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/icecc.bbclass')
-rw-r--r--meta/classes/icecc.bbclass15
1 files changed, 7 insertions, 8 deletions
diff --git a/meta/classes/icecc.bbclass b/meta/classes/icecc.bbclass
index 3ec8c0667d..2f9e3cf8ef 100644
--- a/meta/classes/icecc.bbclass
+++ b/meta/classes/icecc.bbclass
@@ -91,6 +91,10 @@ def create_path(compilers, bb, d):
91 return staging 91 return staging
92 92
93def use_icc(bb,d): 93def use_icc(bb,d):
94 if d.getVar('ICECC_DISABLED') == "1":
95 # don't even try it, when explicitly disabled
96 return "no"
97
94 # allarch recipes don't use compiler 98 # allarch recipes don't use compiler
95 if icc_is_allarch(bb, d): 99 if icc_is_allarch(bb, d):
96 return "no" 100 return "no"
@@ -133,8 +137,7 @@ def use_icc(bb,d):
133 return "yes" 137 return "yes"
134 138
135def icc_is_allarch(bb, d): 139def icc_is_allarch(bb, d):
136 return \ 140 return d.getVar("PACKAGE_ARCH") == "all"
137 bb.data.inherits_class("allarch", d);
138 141
139def icc_is_kernel(bb, d): 142def icc_is_kernel(bb, d):
140 return \ 143 return \
@@ -148,10 +151,6 @@ def icc_is_native(bb, d):
148# Don't pollute allarch signatures with TARGET_FPU 151# Don't pollute allarch signatures with TARGET_FPU
149icc_version[vardepsexclude] += "TARGET_FPU" 152icc_version[vardepsexclude] += "TARGET_FPU"
150def icc_version(bb, d): 153def icc_version(bb, d):
151 if d.getVar('ICECC_DISABLED') == "1":
152 # don't even try it, when explicitly disabled
153 return ""
154
155 if use_icc(bb, d) == "no": 154 if use_icc(bb, d) == "no":
156 return "" 155 return ""
157 156
@@ -179,7 +178,7 @@ def icc_version(bb, d):
179 return tar_file 178 return tar_file
180 179
181def icc_path(bb,d): 180def icc_path(bb,d):
182 if d.getVar('ICECC_DISABLED') == "1": 181 if use_icc(bb, d) == "no":
183 # don't create unnecessary directories when icecc is disabled 182 # don't create unnecessary directories when icecc is disabled
184 return 183 return
185 184
@@ -246,7 +245,7 @@ def set_icecc_env():
246 return 245 return
247 246
248set_icecc_env() { 247set_icecc_env() {
249 if [ "${ICECC_DISABLED}" = "1" ] 248 if [ "${@use_icc(bb, d)}" = "no" ]
250 then 249 then
251 return 250 return
252 fi 251 fi