Skip to content

Commit

Permalink
lmdk: fix building system-service modules
Browse files Browse the repository at this point in the history
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>
lyakh authored and kv2019i committed Feb 6, 2024
1 parent a5bdcce commit 45dc968
Showing 2 changed files with 20 additions and 1 deletion.
10 changes: 10 additions & 0 deletions src/module/audio/sink_api.c
Original file line number Diff line number Diff line change
@@ -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. */

11 changes: 10 additions & 1 deletion src/module/audio/source_api.c
Original file line number Diff line number Diff line change
@@ -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. */

0 comments on commit 45dc968

Please sign in to comment.