On 2019-07-21 18:58, rebe...@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 <rebe...@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


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#44078): https://edk2.groups.io/g/devel/message/44078
Mute This Topic: https://groups.io/mt/32553200/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to