You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/04/29 13:14:31 UTC
[GitHub] [incubator-nuttx] v01d commented on pull request #3602: risc-v/rv32im: Set MAXOPTIMIZATION regardless of any debug options
v01d commented on pull request #3602:
URL: https://github.com/apache/incubator-nuttx/pull/3602#issuecomment-829227628
Looking at the Kconfig, it is actually a choice:
```Kconfig
choice
prompt "Optimization Level"
default DEBUG_NOOPT if DEBUG_SYMBOLS
default DEBUG_FULLOPT if !DEBUG_SYMBOLS
config DEBUG_NOOPT
bool "Suppress Optimization"
---help---
Build without optimization. This is often helpful when debugging code.
config DEBUG_CUSTOMOPT
bool "Custom Optimization"
depends on ARCH_HAVE_CUSTOMOPT
---help---
Select a custom debug level. This is often helpful if you suspect an
optimization level error and want to lower the level of optimization.
config DEBUG_FULLOPT
bool "Normal, Full optimization"
---help---
Build full optimization. This is the normal case for production
firmware.
endchoice # Optimization Level
```
and the custom level comes from
```Kconfig
config DEBUG_OPTLEVEL
string "Custom Optimization Level"
default "-O2"
depends on DEBUG_CUSTOMOPT
---help---
This string represents the custom optimization level that will be
used if DEBUG_CUSTOMOPT.
```
This PR is hardcoding `-Os`. It should actually check for the three cases, mapping to `-O0`, `-Os` or the custom value from Kconfig.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org