arm-trusted-firmware/make_helpers
Boyan Karatotev f7a41fb493 perf(build): be clever about uppercasing
Most of the macros in build_macros.mk get lazily evaluated. That's
mostly fine, except for the fact that the `uppercase` macro needs to
spawn a subshell to get its output. And the target for every file
requires calling `uppercase` many, MANY, times, thrashing performance on
even the most trivial of make commands.

We can be a little clever and only call `uppercase` a handful of times
and then pass around the already uppercased strings.

The same is true about the verbosity augmentation variables. Simply
changing them to simply expanded variables allows for them to be
pre-processed and then used over and over again.

`make realclean` is a pretty good benchmark for this as it doesn't do
much else but must process all the rules, like every other make command.
On a clean checkout of TF-A on an Intel Xeon Gold 5218 (i.e.  slow
single-core) workstation, that command used to take about 7 seconds.
With this patch it takes about 0.5.

Change-Id: I632236a12a40f169e834974ecbc73ff80aac3462
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
2024-11-08 12:27:46 +00:00
..
tbbr fix(tbbr): unrecognised 'tos-fw-key-cert' option 2023-09-07 11:14:52 +01:00
toolchains build: make Poetry optional 2024-09-26 14:23:20 +00:00
arch_features.mk feat(cpufeat): add ENABLE_FEAT_LS64_ACCDATA 2024-11-06 16:52:12 +01:00
armv7-a-cpus.mk refactor(build): merge march32/64 directives 2023-06-22 16:37:03 -05:00
build-rules.mk build: consolidate directory creation rules 2024-07-22 09:41:30 +00:00
build_env.mk build: consolidate directory creation rules 2024-07-22 09:41:30 +00:00
build_macros.mk perf(build): be clever about uppercasing 2024-11-08 12:27:46 +00:00
common.mk perf(build): be clever about uppercasing 2024-11-08 12:27:46 +00:00
cygwin.mk Use SPDX license identifiers 2017-05-03 09:39:28 +01:00
defaults.mk feat(rmmd): el3 token sign during attestation 2024-10-15 08:20:28 -07:00
march.mk build: skip toolchain detection for some targets 2024-05-14 15:41:15 +00:00
msys.mk Use SPDX license identifiers 2017-05-03 09:39:28 +01:00
plat_helpers.mk feat(build): add ability to define platform specific defaults 2024-09-17 21:44:39 +03:00
toolchain.mk build: make Poetry optional 2024-09-26 14:23:20 +00:00
unix.mk build: consolidate directory creation rules 2024-07-22 09:41:30 +00:00
utilities.mk build: fix grouped targets on Make <= 4.2 2024-10-28 12:10:36 +00:00
windows.mk build: consolidate directory creation rules 2024-07-22 09:41:30 +00:00