From eee2a2ef6bc3f2182cf8a87242c2f8f45f7f97bb Mon Sep 17 00:00:00 2001 From: pengyiqiang Date: Fri, 6 Sep 2024 18:05:56 +0800 Subject: [PATCH] lvgl: add customize compilation optimization level config Signed-off-by: pengyiqiang --- graphics/lvgl/Kconfig | 4 ++++ graphics/lvgl/Makefile | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/graphics/lvgl/Kconfig b/graphics/lvgl/Kconfig index 5c11cb6af..a7ab48230 100644 --- a/graphics/lvgl/Kconfig +++ b/graphics/lvgl/Kconfig @@ -1641,4 +1641,8 @@ menu "LVGL configuration" endmenu +config LV_OPTLEVEL + string "Customize compilation optimization level" + default "" + endif # GRAPHICS_LVGL diff --git a/graphics/lvgl/Makefile b/graphics/lvgl/Makefile index e46bb35f3..de23da9f0 100644 --- a/graphics/lvgl/Makefile +++ b/graphics/lvgl/Makefile @@ -78,6 +78,11 @@ 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),)