Skip to content

Commit c7ecdf6

Browse files
heftigxdevs23
authored andcommitted
ZEN: Restore CONFIG_OPTIMIZE_FOR_PERFORMANCE_O3
This reverts a6036a4 (kbuild: drop support for CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3), removes the dependency on CONFIG_ARC and adds RUSTFLAGS. Signed-off-by: Simão Gomes Viana <[email protected]>
1 parent 2a13d27 commit c7ecdf6

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -802,6 +802,9 @@ KBUILD_CFLAGS += -fno-delete-null-pointer-checks
802802
ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE
803803
KBUILD_CFLAGS += -O2
804804
KBUILD_RUSTFLAGS += -Copt-level=2
805+
else ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3
806+
KBUILD_CFLAGS += -O3
807+
KBUILD_RUSTFLAGS += -Copt-level=3
805808
else ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
806809
KBUILD_CFLAGS += -Os
807810
KBUILD_RUSTFLAGS += -Copt-level=s

init/Kconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1458,6 +1458,12 @@ config CC_OPTIMIZE_FOR_PERFORMANCE
14581458
with the "-O2" compiler flag for best performance and most
14591459
helpful compile-time warnings.
14601460

1461+
config CC_OPTIMIZE_FOR_PERFORMANCE_O3
1462+
bool "Optimize more for performance (-O3)"
1463+
help
1464+
Choosing this option will pass "-O3" to your compiler to optimize
1465+
the kernel yet more for performance.
1466+
14611467
config CC_OPTIMIZE_FOR_SIZE
14621468
bool "Optimize for size (-Os)"
14631469
help

0 commit comments

Comments
 (0)