aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2020-04-07 17:53:01 +0800
committerHongxu Jia <hongxu.jia@windriver.com>2020-04-08 10:01:31 +0800
commit4917486c8697081f5412106d9293e2737fe8bf7d (patch)
tree8e121ade09cf9dfc345f09cfdfe0062bb2bc1e9a
parenta115295c1abfdc99ee0fb722d999a859bfcb4eac (diff)
downloadmeta-tensorflow-4917486c8697081f5412106d9293e2737fe8bf7d.tar.gz
meta-tensorflow-4917486c8697081f5412106d9293e2737fe8bf7d.tar.bz2
meta-tensorflow-4917486c8697081f5412106d9293e2737fe8bf7d.zip
classes/bazel.bbclass: support to override bazel jobs
Support to override bazel jobs, then user could set it in local.conf according to the host performance Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
-rw-r--r--classes/bazel.bbclass3
1 files changed, 2 insertions, 1 deletions
diff --git a/classes/bazel.bbclass b/classes/bazel.bbclass
index cee5177..46e1658 100644
--- a/classes/bazel.bbclass
+++ b/classes/bazel.bbclass
@@ -69,11 +69,12 @@ def bazel_get_flags(d):
return flags
TS_DL_DIR ??= "${DL_DIR}"
+BAZEL_JOBS ??= "${@oe.utils.cpu_count()}"
bazel_do_configure () {
cat > "${S}/bazelrc" <<-EOF
build --verbose_failures
build --spawn_strategy=standalone --genrule_strategy=standalone
-build --jobs=${@oe.utils.cpu_count()}
+build --jobs=${BAZEL_JOBS}
test --verbose_failures --verbose_test_summary
test --spawn_strategy=standalone --genrule_strategy=standalone