Skip to content
This repository was archived by the owner on Oct 23, 2020. It is now read-only.

Commit

Permalink
FROMLIST: BACKPORT: Makefile: lld: set -O2 linker flag when linking w…
Browse files Browse the repository at this point in the history
…ith LLD

For arm64:
0.34% size improvement with lld -O2 over lld for vmlinux.
3.3% size improvement with lld -O2 over lld for Image.lz4-dtb.

Link: ClangBuiltLinux/linux#343
Suggested-by: Rui Ueyama <ruiu@google.com>
Suggested-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Tested-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Eliminater74 <eliminater74@gmail.com>
  • Loading branch information
nickdesaulniers authored and Eliminater74 committed Feb 22, 2019
1 parent 55e26e4 commit 151761c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,7 @@ endif
ifeq ($(cc-name),clang)
ifeq ($(ld-name),lld)
KBUILD_CFLAGS += -fuse-ld=lld
KBUILD_LDFLAGS += -O2
endif
endif

Expand Down

0 comments on commit 151761c

Please sign in to comment.