From 05dcf1ccdef58a79fb78bded8b5488291c28759e Mon Sep 17 00:00:00 2001 From: Baofeng Tian Date: Fri, 18 Aug 2023 10:09:32 +0800 Subject: [PATCH] audio: zephyr: add -fno-inline-functions option to zephyr code By enable/disable COMPILER_INLINE_FUNCTION_OPTION to control add or remove -fno-inline-functions build option for sof zephyr code. Signed-off-by: Baofeng Tian --- zephyr/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zephyr/CMakeLists.txt b/zephyr/CMakeLists.txt index 07558fa1f..c29d14e08 100644 --- a/zephyr/CMakeLists.txt +++ b/zephyr/CMakeLists.txt @@ -799,8 +799,9 @@ set(VERSION_H_PATH ${GENERATED_DIRECTORY}/sof_versions.h) find_package(Python3 COMPONENTS Interpreter) set(PYTHON3 "${Python3_EXECUTABLE}") -# We don't know why we have this https://github.com/thesofproject/sof/issues/5212 +if (NOT CONFIG_COMPILER_INLINE_FUNCTION_OPTION) target_compile_options(SOF INTERFACE -fno-inline-functions) +endif() # SOF needs `typeof`, `__VA_ARGS__` and maybe other GNU C99 # extensions. TODO other flags required ?