Kconfig: move compiler options to a separate file

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
This commit is contained in:
Kai Vehmanen 2021-05-17 15:35:12 +03:00 committed by Liam Girdwood
parent 479c09b3e9
commit ffe22f2831
2 changed files with 40 additions and 33 deletions

36
Kconfig
View File

@ -115,39 +115,9 @@ config XT_INTERRUPT_LEVEL_5
rsource "src/Kconfig"
choice
prompt "Optimization"
default OPTIMIZE_FOR_PERFORMANCE
help
Controls how compiler should optimize binary.
This config should affect only compiler settings and is
not meant to be used for conditional compilation of code.
config OPTIMIZE_FOR_PERFORMANCE
bool "Optimize for performance"
help
Apply compiler optimizations prioritizing performance.
It means -O2 for GCC or equivalent for other compilers.
config OPTIMIZE_FOR_SIZE
bool "Optimize for size"
help
Apply compiler optimizations prioritizing binary size.
It means -Os for GCC or equivalent for other compilers.
config OPTIMIZE_FOR_DEBUG
bool "Optimize for debug"
help
Apply compiler optimizations prioritizing debugging experience.
It means -Og for GCC or equivalent for other compilers.
config OPTIMIZE_FOR_NONE
bool "Don't optimize"
help
Apply no compiler optimizations.
It means -O0 for GCC or equivalent for other compilers.
endchoice
if !ZEPHYR_SOF_MODULE
rsource "Kconfig.xtos-build"
endif
menu "Debug"

37
Kconfig.xtos-build Normal file
View File

@ -0,0 +1,37 @@
# SPDX-License-Identifier: BSD-3-Clause
comment "XTOS options / compiler"
choice
prompt "Optimization"
default OPTIMIZE_FOR_PERFORMANCE
help
Controls how compiler should optimize binary.
This config should affect only compiler settings and is
not meant to be used for conditional compilation of code.
config OPTIMIZE_FOR_PERFORMANCE
bool "Optimize for performance"
help
Apply compiler optimizations prioritizing performance.
It means -O2 for GCC or equivalent for other compilers.
config OPTIMIZE_FOR_SIZE
bool "Optimize for size"
help
Apply compiler optimizations prioritizing binary size.
It means -Os for GCC or equivalent for other compilers.
config OPTIMIZE_FOR_DEBUG
bool "Optimize for debug"
help
Apply compiler optimizations prioritizing debugging experience.
It means -Og for GCC or equivalent for other compilers.
config OPTIMIZE_FOR_NONE
bool "Don't optimize"
help
Apply no compiler optimizations.
It means -O0 for GCC or equivalent for other compilers.
endchoice