mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 06:18:40 +08:00
board/sim: add support of custom optimization level
Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
parent
d21d02c65d
commit
22e71e2d71
2 changed files with 8 additions and 1 deletions
|
@ -85,6 +85,7 @@ config ARCH_SIM
|
|||
select ARCH_HAVE_TESTSET
|
||||
select ARCH_HAVE_VFORK
|
||||
select ARCH_HAVE_SETJMP
|
||||
select ARCH_HAVE_CUSTOMOPT
|
||||
select ARCH_SETJMP_H
|
||||
select ALARM_ARCH
|
||||
select ONESHOT
|
||||
|
|
|
@ -45,8 +45,14 @@ ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
|||
ARCHOPTIMIZATIONRUST = -g
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y)
|
||||
MAXOPTIMIZATION := $(CONFIG_DEBUG_OPTLEVEL)
|
||||
else
|
||||
MAXOPTIMIZATION ?= -O2
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_DEBUG_NOOPT),y)
|
||||
ARCHOPTIMIZATION += -O2 -fno-strict-aliasing
|
||||
ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing
|
||||
else
|
||||
ARCHOPTIMIZATIONRUST += -C opt-level=0
|
||||
endif
|
||||
|
|
Loading…
Reference in a new issue