lmdk: fix building system-service modules

System-service modules cannot include Zephyr headers and don't use
exported symbols, they link sink_api.c and source_api.c into their
images. Disable symbol exporting for them.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This commit is contained in:
Guennadi Liakhovetski 2024-01-29 14:35:16 +01:00 committed by Kai Vehmanen
parent a5bdcce1e1
commit 45dc968cb2
2 changed files with 20 additions and 1 deletions

View File

@ -5,7 +5,17 @@
#include <module/audio/sink_api.h>
#include <module/audio/audio_stream.h>
/*
* When building native system-service modules only exported module headers can
* be included, autoconf.h isn't included either. To identify such a build we
* need any symbol that is guaranteed to be defined with any SOF build.
* CONFIG_CORE_COUNT is such a symbol, it is always defined to an integer number
*/
#ifndef CONFIG_CORE_COUNT
#define EXPORT_SYMBOL(...)
#else
#include <rtos/symbol.h>
#endif
/* This file contains public sink API functions that were too large to mark is as inline. */

View File

@ -3,10 +3,19 @@
* Copyright(c) 2023 Intel Corporation. All rights reserved.
*/
#include <module/audio/source_api.h>
#include <module/audio/audio_stream.h>
/*
* When building native system-service modules only exported module headers can
* be included, autoconf.h isn't included either. To identify such a build we
* need any symbol that is guaranteed to be defined with any SOF build.
* CONFIG_CORE_COUNT is such a symbol, it is always defined to an integer number
*/
#ifndef CONFIG_CORE_COUNT
#define EXPORT_SYMBOL(...)
#else
#include <rtos/symbol.h>
#endif
/* This file contains public source API functions that were too large to mark is as inline. */