From f548c34abd49e01407de26c81f29ef89b3cae213 Mon Sep 17 00:00:00 2001 From: Sedat Dilek Date: Fri, 17 Jun 2022 13:24:50 +0200 Subject: [PATCH] vmlinux: clang: thinlto: Add --thinlto-jobs=4 to KBUILD_LDFLAGS --- scripts/Makefile.vmlinux_o | 2 +- scripts/link-vmlinux.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/Makefile.vmlinux_o b/scripts/Makefile.vmlinux_o index 3c97a1564947..4c1991c91417 100644 --- a/scripts/Makefile.vmlinux_o +++ b/scripts/Makefile.vmlinux_o @@ -53,7 +53,7 @@ objtool_args := \ quiet_cmd_ld_vmlinux.o = LD $@ cmd_ld_vmlinux.o = \ - $(LD) ${KBUILD_LDFLAGS} -r -o $@ \ + $(LD) ${KBUILD_LDFLAGS} --thinlto-jobs=4 -r -o $@ \ $(addprefix -T , $(initcalls-lds)) \ --whole-archive $(KBUILD_VMLINUX_OBJS) --no-whole-archive \ --start-group $(KBUILD_VMLINUX_LIBS) --end-group \ diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh index eecc1863e556..1624da57807b 100755 --- a/scripts/link-vmlinux.sh +++ b/scripts/link-vmlinux.sh @@ -83,7 +83,7 @@ vmlinux_link() else wl= ld="${LD}" - ldflags="${KBUILD_LDFLAGS} ${LDFLAGS_vmlinux}" + ldflags="${KBUILD_LDFLAGS} --thinlto-jobs=4 ${LDFLAGS_vmlinux}" ldlibs= fi -- 2.36.1