Commit 1c51f31b authored by Behan Webster's avatar Behan Webster Committed by Kleber Sacilotto de Souza

kbuild: use -Oz instead of -Os when using clang

BugLink: https://bugs.launchpad.net/bugs/1810958

commit 6748cb3c upstream.

This generates smaller resulting object code when compiled with clang.
Signed-off-by: default avatarBehan Webster <behanw@converseincode.com>
Signed-off-by: default avatarMatthias Kaehlcke <mka@chromium.org>
Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
[nc: Adjust context due to lack of commit a76bcf55 in linux-4.4.y]
Signed-off-by: default avatarNathan Chancellor <natechancellor@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarJuerg Haefliger <juergh@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent 711e41a5
......@@ -644,7 +644,7 @@ KBUILD_CFLAGS += $(call cc-disable-warning, int-in-bool-context)
KBUILD_CFLAGS += $(call cc-disable-warning, attribute-alias)
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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment