Skip to content

Commit

Permalink
UPSTREAM: kbuild: use -Oz instead of -Os when using clang
Browse files Browse the repository at this point in the history
This generates smaller resulting object code when compiled with clang.

Signed-off-by: Behan Webster <behanw@converseincode.com>
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
(cherry picked from commit 6748cb3c299de1ffbe56733647b01dbcc398c419)
Signed-off-by: Greg Hackmann <ghackmann@google.com>

Change-Id: I5336ef3af6c7c638d9a68661c3c0e3f22693fdc8
  • Loading branch information
behanw authored and greghackmann committed Oct 9, 2017
1 parent 8c4e060 commit 6602531
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ KBUILD_CFLAGS += $(call cc-disable-warning, format-overflow)
KBUILD_CFLAGS += $(call cc-disable-warning, int-in-bool-context)

ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
KBUILD_CFLAGS += -Os
KBUILD_CFLAGS += $(call cc-option,-Oz,-Os)
else
ifdef CONFIG_PROFILE_ALL_BRANCHES
KBUILD_CFLAGS += -O2
Expand Down

0 comments on commit 6602531

Please sign in to comment.