diff options
| author | Rabin Vincent <rabin@rab.in> | 2017-04-30 12:16:00 -0400 |
|---|---|---|
| committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2017-05-03 00:43:24 -0400 |
| commit | bd74370b8657fc6fdab7b0d5024d011985183809 (patch) | |
| tree | c56e46863c2140258cb93768fd19adbee3f68c8c /Makefile | |
| parent | e8a3118e1f5cbe0c26704419390bf074689b349f (diff) | |
Makefile: evaluate LDFLAGS_BUILD_ID only once
Evaluate LDFLAGS_BUILD_ID (which involves invoking the compiler) only
once instead of over and over.
This provides a ~20% reduction in null build time with x86 allnoconfig:
$ make allnoconfig && make -j8
$ perf stat -r5 -e sched:sched_process_exec make -j8
- 2 119 sched:sched_process_exec
+ 1 878 sched:sched_process_exec
- 1,238817018 seconds time elapsed
+ 0,971020553 seconds time elapsed
Signed-off-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
| @@ -829,7 +829,7 @@ KBUILD_AFLAGS += $(ARCH_AFLAGS) $(KAFLAGS) | |||
| 829 | KBUILD_CFLAGS += $(ARCH_CFLAGS) $(KCFLAGS) | 829 | KBUILD_CFLAGS += $(ARCH_CFLAGS) $(KCFLAGS) |
| 830 | 830 | ||
| 831 | # Use --build-id when available. | 831 | # Use --build-id when available. |
| 832 | LDFLAGS_BUILD_ID = $(patsubst -Wl$(comma)%,%,\ | 832 | LDFLAGS_BUILD_ID := $(patsubst -Wl$(comma)%,%,\ |
| 833 | $(call cc-ldoption, -Wl$(comma)--build-id,)) | 833 | $(call cc-ldoption, -Wl$(comma)--build-id,)) |
| 834 | KBUILD_LDFLAGS_MODULE += $(LDFLAGS_BUILD_ID) | 834 | KBUILD_LDFLAGS_MODULE += $(LDFLAGS_BUILD_ID) |
| 835 | LDFLAGS_vmlinux += $(LDFLAGS_BUILD_ID) | 835 | LDFLAGS_vmlinux += $(LDFLAGS_BUILD_ID) |
