From bf49316bb9913b7c89de64d6a194be31aa66e16b Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 5 Sep 2018 00:41:13 +0100 Subject: populate_base_sdk: Stop running gcc --version all the time Running 'gcc --version' for every image recipe is slow and increases parsing time/resource usage for no good reason. Only compute the value in when we're really running the task/function. Signed-off-by: Richard Purdie --- meta/lib/oe/utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'meta/lib') diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py index f22a6ab596..fbda7035f1 100644 --- a/meta/lib/oe/utils.py +++ b/meta/lib/oe/utils.py @@ -342,9 +342,12 @@ def format_pkg_list(pkg_dict, ret_format=None): return '\n'.join(output) -def host_gcc_version(d): +def host_gcc_version(d, taskcontextonly=False): import re, subprocess + if taskcontextonly and d.getVar('BB_WORKERCONTEXT') != '1': + return + compiler = d.getVar("BUILD_CC") try: env = os.environ.copy() -- cgit v1.2.3