public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: rebecca@bsdio.com
To: devel@edk2.groups.io, Jordan Justen <jordan.l.justen@intel.com>,
	Laszlo Ersek <lersek@redhat.com>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>
Subject: Re: [edk2-devel] [PATCH] OvmfPkg: enable multiprocessor builds when using build.sh
Date: Sun, 21 Jul 2019 18:59:49 -0600	[thread overview]
Message-ID: <f2f58775-50a3-e64b-d139-cc3ba026cebf@bsdio.com> (raw)
In-Reply-To: <15B394CDDC5FF98D.6157@groups.io>

On 2019-07-21 18:58, rebecca@bsdio.com wrote:
> When building both BaseTools and OvmfPkg, enable multiprocessor builds,
> using up to the number of cores available in the system. This can
> drastically reduce build times.
> For example, on a modern ThreadRipper system the
> time required to build decreases from 3 minutes to 1 minute.
>
> Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
> ---
>  OvmfPkg/build.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/OvmfPkg/build.sh b/OvmfPkg/build.sh
> index 4fcbdd2bc9..5d3a672bd2 100755
> --- a/OvmfPkg/build.sh
> +++ b/OvmfPkg/build.sh
> @@ -40,7 +40,7 @@ ARCH_X64=no
>  BUILDTARGET=DEBUG
>  BUILD_OPTIONS=
>  PLATFORMFILE=
> -THREADNUMBER=1
> +THREADNUMBER=$(getconf _NPROCESSORS_ONLN)
>  LAST_ARG=
>  RUN_QEMU=no
>  ENABLE_FLASH=no


I tested this on Linux (KUbuntu 18.10), macOS Mojave and FreeBSD
13-CURRENT. All of those support "getconf _NPROCESSORS_ONLN".


-- 
Rebecca Cran


       reply	other threads:[~2019-07-22  0:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <15B394CDDC5FF98D.6157@groups.io>
2019-07-22  0:59 ` rebecca [this message]
2019-07-22  0:58 [PATCH] OvmfPkg: enable multiprocessor builds when using build.sh rebecca
2019-07-22  7:11 ` Jordan Justen
2019-07-22 20:06   ` [edk2-devel] " Laszlo Ersek
2019-07-22 23:14     ` Jordan Justen
2019-07-22 23:52       ` rebecca
2019-07-23  0:00       ` rebecca
2019-07-23  7:44         ` Laszlo Ersek
2019-07-23  8:05           ` Jordan Justen
2019-07-23 12:05             ` Laszlo Ersek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f2f58775-50a3-e64b-d139-cc3ba026cebf@bsdio.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox