All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Scull <ascull@google.com>
To: Simon Glass <sjg@chromium.org>
Cc: "U-Boot Mailing List" <u-boot@lists.denx.de>,
	"Heinrich Schuchardt" <xypron.glpk@gmx.de>,
	"Sean Anderson" <seanga2@gmail.com>,
	"Marek Behún" <marek.behun@nic.cz>,
	"U-Boot Custodians" <u-boot-custodians@lists.denx.de>,
	"Tom Rini" <trini@konsulko.com>, "Bin Meng" <bmeng.cn@gmail.com>,
	"Ilias Apalodimas" <ilias.apalodimas@linaro.org>,
	"Joel Peshkin" <joel.peshkin@broadcom.com>,
	"Masahiro Yamada" <yamada.masahiro@socionext.com>,
	"Patrick Delaunay" <patrick.delaunay@foss.st.com>,
	"Ye Li" <ye.li@nxp.com>
Subject: Re: [PATCH 01/10] Makefile: v2 Allow LTO to be disabled for a build
Date: Sun, 15 May 2022 19:52:53 +0100	[thread overview]
Message-ID: <CADcWuH2-bdjDdN7SkMAJJ+yVCf5RQwZh+M3NdvNZ+YY1e7RNnQ@mail.gmail.com> (raw)
In-Reply-To: <CAPnjgZ3c0FVr+UNHqv=AKJnXSfLVHa83TG5cEP92J3sz7eKHDA@mail.gmail.com>

On Mon, 11 Apr 2022 at 22:46, Simon Glass <sjg@chromium.org> wrote:
>
> Hi Andrew,
>
> On Thu, 31 Mar 2022 at 04:29, Andrew Scull <ascull@google.com> wrote:
> >
> > On Sun, 27 Mar 2022 at 21:27, Simon Glass <sjg@chromium.org> wrote:
> > >
> > > LTO (Link-Time Optimisation) is an very useful feature which can
> > > significantly reduce the size of U-Boot binaries. So far it has been
> > > made available for selected ARM boards and sandbox.
> > >
> > > However, incremental builds are much slower when LTO is used. For example,
> > > an incremental build of sandbox takes 2.1 seconds on my machine, but 6.7
> > > seconds with LTO enabled.
> >
> > This is something that has been bothering me too. I'd resorted to adding
> > `# CONFIG_LTO is not set` to sandbox_defconfig because I couldn't work
> > out how to stop .config being regenerated each build. But then the
> > diff gets in the way and is difficult to manage.
> >
> > > Add a LTO_BUILD=n parameter to the build, so it can be disabled during
> > > development if needed, for faster builds.
> >
> > If you go the build parameter route rather than config route to
> > address this, could the flag be consistent e.g. with NO_SDL=1, which
> > would mean NO_LTO=1?
>
> That seems OK to me. Would you like to do that and send a new version?
>
> Here is a better version of the patch to use as a starting point:
>
> https://source.denx.de/u-boot/custodians/u-boot-dm/-/commit/2d4ebfb0e8e86a1b347e6cbd4dbec9a4eb745bd5

I realised my make command was rebuilding the defconfig each time
which, unsurprisingly, was regenerating the .config file. Now I can
unset CONFIG_LTO in .config and have it persist for incremental
builds, which is a pattern I've also used when working on Linux, and
doesn't need an alternate toggle in the makefiles to achieve the same
result. My preference is to use .config for the time being.

  parent reply	other threads:[~2022-05-15 18:53 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-27 20:26 [PATCH 00/10] dm: Experiments for reducing SPL memory usage Simon Glass
2022-03-27 20:26 ` [PATCH 01/10] Makefile: v2 Allow LTO to be disabled for a build Simon Glass
2022-03-31 10:29   ` Andrew Scull
2022-04-11 21:46     ` Simon Glass
2022-04-11 21:53       ` Tom Rini
2022-05-15 18:52       ` Andrew Scull [this message]
2022-03-27 20:26 ` [PATCH 02/10] sandbox: Correct loss of early output in SPL Simon Glass
2022-04-19 12:49   ` Tom Rini
2022-03-27 20:26 ` [PATCH 03/10] Makefile: Drop a stale comment about linking Simon Glass
2022-04-19 12:49   ` Tom Rini
2022-03-27 20:26 ` [PATCH 04/10] Makefile: Avoid resetting link flags in config.mk Simon Glass
2022-04-19 12:49   ` Tom Rini
2022-03-27 20:26 ` [PATCH 05/10] sandbox: Allow link flags to be given Simon Glass
2022-04-19 12:49   ` Tom Rini
2022-03-27 20:26 ` [PATCH 06/10] sandbox: Align linker lists to a 32-byte boundary Simon Glass
2022-04-19 12:49   ` Tom Rini
2022-03-27 20:26 ` [PATCH 07/10] dm: core: Allow devres to be disabled in SPL Simon Glass
2022-04-12 19:07   ` Angus Ainslie
2022-04-19 12:49   ` Tom Rini
2022-03-27 20:26 ` [PATCH 08/10] dm: core: Deal with a wrinkle with linker lists Simon Glass
2022-04-19 12:50   ` Tom Rini
2022-03-27 20:26 ` [PATCH 09/10] RFC: dm: add tag support Simon Glass
2022-03-27 20:26 ` [PATCH 10/10] WIP: dm: core: Add a command to calculate memory usage Simon Glass

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-all 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=CADcWuH2-bdjDdN7SkMAJJ+yVCf5RQwZh+M3NdvNZ+YY1e7RNnQ@mail.gmail.com \
    --to=ascull@google.com \
    --cc=bmeng.cn@gmail.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=joel.peshkin@broadcom.com \
    --cc=marek.behun@nic.cz \
    --cc=patrick.delaunay@foss.st.com \
    --cc=seanga2@gmail.com \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=u-boot-custodians@lists.denx.de \
    --cc=u-boot@lists.denx.de \
    --cc=xypron.glpk@gmx.de \
    --cc=yamada.masahiro@socionext.com \
    --cc=ye.li@nxp.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.