Skip to contentSkip to conversation

doc: Mention OE routine for setting BB_NUMBER_THREADS

PATCH New Robert P. J. Day 1 participant 1 message Mar 17, 2021

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 doc: Mention OE routine for setting BB_NUMBER_THREADS

Given the discussion of BB_NUMBER_THREADS, what it means and how to set it, it seems only fair to mention that it's probably already set.

---

doc/bitbake-user-manual/bitbake-user-manual-execution.rst +8 -0
index d74e768f..ac8a57e1 100644
@@ -45,6 +45,14 @@ the BitBake command and its options, see ":ref:`The BitBake Command
    A possibly simpler solution is that some Linux distributions (e.g.
    Debian and Ubuntu) provide the ``ncpus`` command.
 
+   If you're using a relatively recent version of OpenEmbedded, the
+   provided ``bitbake.conf`` file already comes with a call to an
+   OE utility that does this calculation for you so you don't need
+   to worry about it::
+
+     # Default to setting automatically based on cpu count
+     BB_NUMBER_THREADS ?= "${@oe.utils.cpu_count()}"
+
 Parsing the Base Configuration Metadata
 =======================================
 
Signature · 6 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                         http://crashcourse.ca

LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================