
gcc-wrapper.py is called for every invocation of CC in Kbuild, of which there a lot. Running gcc-wrapper.py has overhead of ~11ms for simple commands, such as: time python gcc-wrapper.py true python gcc-wrapper.py true 0.00s user 0.00s system 71% cpu 0.011 total Over hundreds/thousands of CC calls, this adds up. Thus, convert the python script to an equivalent C program and use that instead. Times below represent average across 3 consistent runs, +/-0.5s: - Complete msm-kernel mixed build before: 1:37.75 after: 1:09.36 (-28s, 29%) - No-op incremental build before: 1:02.87 after: 0:38.50 (-24s, 39%) Change-Id: Ia3f216e50f31615c53a0a74b502f103c01200347 Signed-off-by: Elliot Berman <eberman@codeaurora.org>
9 lines
210 B
Makefile
9 lines
210 B
Makefile
# SPDX-License-Identifier: GPL-2.0-only
|
|
#
|
|
# fixdep: used to generate dependency information during build process
|
|
|
|
hostprogs-always-y += fixdep
|
|
|
|
hostprogs-always-y += cc-wrapper
|
|
$(obj)/cc-wrapper: $(obj)/fixdep
|