lvgl/Makefile: support multiple options for LV_OPTLEVEL
This configuration is added to put LVGL into PSRAM for execution, and the lv_*.o file needs to be matched in the link script. Since LTO optimization will cause the file name to be modified, resulting in a matching failure, it will only take effect if LTO optimization is removed during compilation. Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
This commit is contained in:
parent
eee2a2ef6b
commit
c0d8a07042
@ -117,6 +117,10 @@ if(CONFIG_GRAPHICS_LVGL)
|
||||
nuttx_add_dependencies(TARGET lvgl DEPENDS turbojpeg-static)
|
||||
endif()
|
||||
|
||||
if(NOT ${CONFIG_LV_OPTLEVEL} STREQUAL "")
|
||||
add_compile_options(${CONFIG_LV_OPTLEVEL})
|
||||
endif()
|
||||
|
||||
set_property(
|
||||
TARGET nuttx
|
||||
APPEND
|
||||
|
@ -43,6 +43,13 @@ CFLAGS += "-DLV_PROFILER_BEGIN_TAG(str)=sched_note_beginex(NOTE_TAG_GRAPHICS, st
|
||||
CFLAGS += "-DLV_PROFILER_END_TAG(str)=sched_note_endex(NOTE_TAG_GRAPHICS, str)"
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_LV_OPTLEVEL), "")
|
||||
# Since multiple options need to be supported, subst needs to be used here to remove
|
||||
# the redundant double quotes, otherwise it will cause command parsing errors.
|
||||
CFLAGS += $(subst ",, $(CONFIG_LV_OPTLEVEL))
|
||||
CXXFLAGS += $(subst ",, $(CONFIG_LV_OPTLEVEL))
|
||||
endif
|
||||
|
||||
# Set up build configuration and environment
|
||||
|
||||
WD := ${shell echo $(CURDIR) | sed -e 's/ /\\ /g'}
|
||||
@ -78,11 +85,6 @@ ifeq ($(wildcard $(LVGL_UNPACKNAME)/.git),)
|
||||
context:: $(LVGL_UNPACKNAME)
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_LV_OPTLEVEL), "")
|
||||
CFLAGS += $(CONFIG_LV_OPTLEVEL)
|
||||
CXXFLAGS += $(CONFIG_LV_OPTLEVEL)
|
||||
endif
|
||||
|
||||
include $(APPDIR)/Application.mk
|
||||
|
||||
ifeq ($(wildcard $(LVGL_UNPACKNAME)/.git),)
|
||||
|
Loading…
x
Reference in New Issue
Block a user