summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMingli Yu <mingli.yu@windriver.com>2020-08-12 05:22:48 +0000
committerKhem Raj <raj.khem@gmail.com>2020-08-12 23:33:55 -0700
commitccb0a3a786e5f59ec681a013be94ddd0d9e97ec9 (patch)
tree66ee976269bb3f3df28fe0723810f1daac99203e
parentedd7e22b0db5bf24ccbdf79557907a66cb615ee0 (diff)
downloadmeta-clang-ccb0a3a786e5f59ec681a013be94ddd0d9e97ec9.tar.gz
clang: set the default pigz thread
pigz, which stands for parallel implementation of gzip, is a fully functional replacement for gzip that exploits multiple processors and multiple cores to the hilt when compressing data. do_package uses pigz to compress data to speed up the time if there is pigz available on the build server. But for some big package such as clang, there comes below error during do_package. gzip: stdout: Cannot allocate memory tar: TOPDIR/sstate-cache/20/80/sstate:clang:cortexa57-wrs-linux:10.0.1:r0:cortexa57:3:20808f8a746b00ec9470a81057c8595d878cfe8c565cfbcbbaa3ea870528ee34_package.tgz.QF5dss8M: Wrote only 8192 of 10240 bytes tar: Child returned status 1 tar: Error is not recoverable: exiting now So set the default pigz thread for clang and the user also can customize the pigz thread such as PIGZ_pn-clang = "-p 3" for clang in local.conf to avoid eating so much memory. Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
-rw-r--r--recipes-devtools/clang/clang.inc3
1 files changed, 3 insertions, 0 deletions
diff --git a/recipes-devtools/clang/clang.inc b/recipes-devtools/clang/clang.inc
index a99049d..41ba7bb 100644
--- a/recipes-devtools/clang/clang.inc
+++ b/recipes-devtools/clang/clang.inc
@@ -20,4 +20,7 @@ LLDBMD5SUM = "2e0d44968471fcde980034dbb826bea9"
20 20
21LLVM_LIBDIR_SUFFIX="${@d.getVar('baselib').replace('lib', '')}" 21LLVM_LIBDIR_SUFFIX="${@d.getVar('baselib').replace('lib', '')}"
22 22
23# set the default pigz thread
24export PIGZ = "-p ${@oe.utils.cpu_count(at_least=2)}"
25
23require common.inc 26require common.inc