mirror of https://github.com/thesofproject/sof.git
cmake: add EXTRA_CFLAGS support
Example: EXTRA_CFLAGS="-Werror -g0" ./scripts/xtensa-build-all.sh Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This commit is contained in:
parent
771db86de2
commit
83c10268f1
|
@ -393,6 +393,7 @@ do
|
|||
"${MEU_PATH_OPTION}" \
|
||||
"${PRIVATE_KEY_OPTION}" \
|
||||
-DINIT_CONFIG=${PLATFORM}${DEFCONFIG_PATCH}_defconfig \
|
||||
-DEXTRA_CFLAGS="${EXTRA_CFLAGS}" \
|
||||
"$SOF_TOP"
|
||||
)
|
||||
|
||||
|
|
|
@ -119,6 +119,8 @@ target_compile_options(sof_options INTERFACE ${stdlib_flag} -fno-inline-function
|
|||
# 3) custom function that is used instead of target_sources and sets flags
|
||||
# for each added source based on file extension
|
||||
|
||||
separate_arguments(EXTRA_CFLAGS_AS_LIST NATIVE_COMMAND ${EXTRA_CFLAGS})
|
||||
|
||||
# No space between -imacros and its argument to avoid CMake
|
||||
# de-duplication "feature"
|
||||
target_compile_options(sof_options INTERFACE
|
||||
|
@ -129,6 +131,7 @@ target_compile_options(sof_options INTERFACE
|
|||
-Wmissing-prototypes
|
||||
-Wpointer-arith
|
||||
${XTENSA_C_FLAGS}
|
||||
${EXTRA_CFLAGS_AS_LIST}
|
||||
>
|
||||
-imacros${CONFIG_H_PATH}
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue