diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-09-05 00:41:13 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-09-05 18:00:25 +0100 |
commit | 7a76bb53040663e009abab98ffcdc99aa5006b86 (patch) | |
tree | 61e5708a0d77d1cd2fd5367ebd3889831b261742 /meta/lib/oe/utils.py | |
parent | bcaa35fe541ea7dafd9cadb3c89c244c35bbe0ff (diff) | |
download | poky-7a76bb53040663e009abab98ffcdc99aa5006b86.tar.gz |
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.
(From OE-Core rev: bf49316bb9913b7c89de64d6a194be31aa66e16b)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe/utils.py')
-rw-r--r-- | meta/lib/oe/utils.py | 5 |
1 files changed, 4 insertions, 1 deletions
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): | |||
342 | 342 | ||
343 | return '\n'.join(output) | 343 | return '\n'.join(output) |
344 | 344 | ||
345 | def host_gcc_version(d): | 345 | def host_gcc_version(d, taskcontextonly=False): |
346 | import re, subprocess | 346 | import re, subprocess |
347 | 347 | ||
348 | if taskcontextonly and d.getVar('BB_WORKERCONTEXT') != '1': | ||
349 | return | ||
350 | |||
348 | compiler = d.getVar("BUILD_CC") | 351 | compiler = d.getVar("BUILD_CC") |
349 | try: | 352 | try: |
350 | env = os.environ.copy() | 353 | env = os.environ.copy() |