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
@ -85,6 +85,7 @@ config ARCH_SIM
|
|||||||
select ARCH_HAVE_TESTSET
|
select ARCH_HAVE_TESTSET
|
||||||
select ARCH_HAVE_VFORK
|
select ARCH_HAVE_VFORK
|
||||||
select ARCH_HAVE_SETJMP
|
select ARCH_HAVE_SETJMP
|
||||||
|
select ARCH_HAVE_CUSTOMOPT
|
||||||
select ARCH_SETJMP_H
|
select ARCH_SETJMP_H
|
||||||
select ALARM_ARCH
|
select ALARM_ARCH
|
||||||
select ONESHOT
|
select ONESHOT
|
||||||
|
@ -45,8 +45,14 @@ ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
|||||||
ARCHOPTIMIZATIONRUST = -g
|
ARCHOPTIMIZATIONRUST = -g
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y)
|
||||||
|
MAXOPTIMIZATION := $(CONFIG_DEBUG_OPTLEVEL)
|
||||||
|
else
|
||||||
|
MAXOPTIMIZATION ?= -O2
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq ($(CONFIG_DEBUG_NOOPT),y)
|
ifneq ($(CONFIG_DEBUG_NOOPT),y)
|
||||||
ARCHOPTIMIZATION += -O2 -fno-strict-aliasing
|
ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing
|
||||||
else
|
else
|
||||||
ARCHOPTIMIZATIONRUST += -C opt-level=0
|
ARCHOPTIMIZATIONRUST += -C opt-level=0
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user