From a953f14e782101e2320bda9d98eb01e4b5ecbb1c Mon Sep 17 00:00:00 2001 From: Bowen Wang Date: Fri, 9 Aug 2024 20:29:45 +0800 Subject: [PATCH] openamp/libmetal: use config OPENAMP_CACHE to control lib metal cache too metal cache is a new config to control weather to use the cache API. Signed-off-by: Bowen Wang --- openamp/libmetal.cmake | 4 ++++ openamp/libmetal.defs | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/openamp/libmetal.cmake b/openamp/libmetal.cmake index f92c3517ea..5e5a29f18c 100644 --- a/openamp/libmetal.cmake +++ b/openamp/libmetal.cmake @@ -74,6 +74,10 @@ set(MACHINE ${CONFIG_ARCH}) set(CMAKE_SYSTEM_NAME NuttX) set(WITH_DOC OFF) +if(CONFIG_OPENAMP_CACHE) + add_compile_definitions(METAL_CACHE) +endif() + add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/libmetal ${CMAKE_CURRENT_BINARY_DIR}/libmetal EXCLUDE_FROM_ALL) diff --git a/openamp/libmetal.defs b/openamp/libmetal.defs index 20254f5bad..ac6e5b63ce 100644 --- a/openamp/libmetal.defs +++ b/openamp/libmetal.defs @@ -56,6 +56,10 @@ CSRCS += libmetal/lib/log.c CSRCS += libmetal/lib/shmem.c CSRCS += libmetal/lib/version.c +ifeq ($(CONFIG_OPENAMP_CACHE),y) + CFLAGS += -DMETAL_CACHE +endif + CFLAGS += -DMETAL_INTERNAL LIBMETAL_HDRS_SEDEXP := \