diff options
| author | Douglas Anderson <dianders@chromium.org> | 2019-03-14 19:41:59 -0400 |
|---|---|---|
| committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-03-16 23:56:30 -0400 |
| commit | 0c22be0712b8771011880972aa30d3412aa3334e (patch) | |
| tree | 514641da52c0df657f346be9cd6a971594d752ec | |
| parent | f6d9db6355227656108cb93dd8c74d9a9904c5fb (diff) | |
kbuild: Make NOSTDINC_FLAGS a simply expanded variable
During a simple no-op (nothing changed) build I saw 39 invocations of
the C compiler with the argument "-print-file-name=include". We don't
need to call the C compiler 39 times for this--one time will suffice.
Let's change NOSTDINC_FLAGS to a simply expanded variable to avoid
this since there doesn't appear to be any reason it should be
recursively expanded.
On my build this shaved ~400 ms off my "no-op" build.
Note that the recursive expansion seems to date back to the (really
old) commit e8f5bdb02ce0 ("[PATCH] Makefile include path ordering").
It's a little unclear to me if the point of that patch was to switch
the variable to be recursively expanded (which it did) or to avoid
directly assigning to NOSTDINC_FLAGS (AKA to switch to +=) because
someone else (out of tree?) was setting it. I presume later since if
the only goal was to switch to recursive expansion the patch would
have just removed the ":".
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
| -rw-r--r-- | Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
| @@ -412,7 +412,7 @@ CHECK = sparse | |||
| 412 | 412 | ||
| 413 | CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \ | 413 | CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \ |
| 414 | -Wbitwise -Wno-return-void -Wno-unknown-attribute $(CF) | 414 | -Wbitwise -Wno-return-void -Wno-unknown-attribute $(CF) |
| 415 | NOSTDINC_FLAGS = | 415 | NOSTDINC_FLAGS := |
| 416 | CFLAGS_MODULE = | 416 | CFLAGS_MODULE = |
| 417 | AFLAGS_MODULE = | 417 | AFLAGS_MODULE = |
| 418 | LDFLAGS_MODULE = | 418 | LDFLAGS_MODULE = |
