Skip to content

Commit

Permalink
ZEN: Restore CONFIG_OPTIMIZE_FOR_PERFORMANCE_O3
Browse files Browse the repository at this point in the history
This reverts a6036a4 (kbuild: drop
support for CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3), removes the
dependency on CONFIG_ARC and adds RUSTFLAGS.
  • Loading branch information
heftig committed Dec 11, 2022
1 parent b88b54d commit 7042e70
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,9 @@ KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member)
ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE
KBUILD_CFLAGS += -O2
KBUILD_RUSTFLAGS += -Copt-level=2
else ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3
KBUILD_CFLAGS += -O3
KBUILD_RUSTFLAGS += -Copt-level=3
else ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
KBUILD_CFLAGS += -Os
KBUILD_RUSTFLAGS += -Copt-level=s
Expand Down
6 changes: 6 additions & 0 deletions init/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1414,6 +1414,12 @@ config CC_OPTIMIZE_FOR_PERFORMANCE
with the "-O2" compiler flag for best performance and most
helpful compile-time warnings.

config CC_OPTIMIZE_FOR_PERFORMANCE_O3
bool "Optimize more for performance (-O3)"
help
Choosing this option will pass "-O3" to your compiler to optimize
the kernel yet more for performance.

config CC_OPTIMIZE_FOR_SIZE
bool "Optimize for size (-Os)"
help
Expand Down

0 comments on commit 7042e70

Please sign in to comment.