From c77bcd2cf831e1c800a75085f37ea2117006be3d Mon Sep 17 00:00:00 2001 From: Luca Burelli Date: Tue, 6 Aug 2024 17:24:20 +0200 Subject: [PATCH] llext-edk: (refactor) unify variable names The variable llext_edk_cflags was used in the main CMakeLists.txt file, while llext_cflags was used in the llext-edk.cmake file. This commit unifies the variable names to use llext_edk_cflags in both files. No logic changes are introduced by this commit. Signed-off-by: Luca Burelli --- CMakeLists.txt | 2 +- cmake/llext-edk.cmake | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c13397cae7d..586d7c8eb08 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2162,7 +2162,7 @@ add_custom_command( -DAPPLICATION_SOURCE_DIR=${APPLICATION_SOURCE_DIR} -DINTERFACE_INCLUDE_DIRECTORIES="$" -Dllext_edk_file=${llext_edk_file} - -Dllext_cflags="${llext_edk_cflags}" + -Dllext_edk_cflags="${llext_edk_cflags}" -Dllext_edk_name=${CONFIG_LLEXT_EDK_NAME} -DWEST_TOPDIR=${WEST_TOPDIR} -DZEPHYR_BASE=${ZEPHYR_BASE} diff --git a/cmake/llext-edk.cmake b/cmake/llext-edk.cmake index 5273992a032..24ea41fa143 100644 --- a/cmake/llext-edk.cmake +++ b/cmake/llext-edk.cmake @@ -18,7 +18,7 @@ # from. It should simply be the INTERFACE_INCLUDE_DIRECTORIES property of the # zephyr_interface target. # - llext_edk_file: Output file name for the tarball. -# - llext_cflags: Additional flags to be added to the generated flags. +# - llext_edk_cflags: Flags to be used for source compile commands. # - ZEPHYR_BASE: Path to the zephyr base directory. # - WEST_TOPDIR: Path to the west top directory. # - APPLICATION_SOURCE_DIR: Path to the application source directory. @@ -93,10 +93,10 @@ string(REGEX REPLACE "[^a-zA-Z0-9]" "_" llext_edk_name_sane ${llext_edk_name}) string(TOUPPER ${llext_edk_name_sane} llext_edk_name_sane) set(install_dir_var "${llext_edk_name_sane}_INSTALL_DIR") -separate_arguments(llext_cflags NATIVE_COMMAND ${llext_cflags}) +separate_arguments(llext_edk_cflags NATIVE_COMMAND ${llext_edk_cflags}) set(make_relative FALSE) -foreach(flag ${llext_cflags}) +foreach(flag ${llext_edk_cflags}) if (flag STREQUAL "-imacros") set(make_relative TRUE) elseif (make_relative) @@ -116,11 +116,10 @@ foreach(flag ${llext_cflags}) list(APPEND new_cflags ${flag}) endif() endforeach() -set(llext_cflags ${new_cflags}) +set(llext_edk_cflags ${new_cflags}) - -list(APPEND base_flags_make ${llext_cflags} ${imacros_make} -DLL_EXTENSION_BUILD) -list(APPEND base_flags_cmake ${llext_cflags} ${imacros_cmake} -DLL_EXTENSION_BUILD) +list(APPEND base_flags_make ${llext_edk_cflags} ${imacros_make} -DLL_EXTENSION_BUILD) +list(APPEND base_flags_cmake ${llext_edk_cflags} ${imacros_cmake} -DLL_EXTENSION_BUILD) separate_arguments(include_dirs NATIVE_COMMAND ${INTERFACE_INCLUDE_DIRECTORIES}) file(MAKE_DIRECTORY ${llext_edk_inc})