Skip to content

Commit c77bcd2

Browse files
pillo79carlescufi
authored andcommitted
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 <[email protected]>
1 parent ee08327 commit c77bcd2

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2162,7 +2162,7 @@ add_custom_command(
21622162
-DAPPLICATION_SOURCE_DIR=${APPLICATION_SOURCE_DIR}
21632163
-DINTERFACE_INCLUDE_DIRECTORIES="$<TARGET_PROPERTY:zephyr_interface,INTERFACE_INCLUDE_DIRECTORIES>"
21642164
-Dllext_edk_file=${llext_edk_file}
2165-
-Dllext_cflags="${llext_edk_cflags}"
2165+
-Dllext_edk_cflags="${llext_edk_cflags}"
21662166
-Dllext_edk_name=${CONFIG_LLEXT_EDK_NAME}
21672167
-DWEST_TOPDIR=${WEST_TOPDIR}
21682168
-DZEPHYR_BASE=${ZEPHYR_BASE}

cmake/llext-edk.cmake

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# from. It should simply be the INTERFACE_INCLUDE_DIRECTORIES property of the
1919
# zephyr_interface target.
2020
# - llext_edk_file: Output file name for the tarball.
21-
# - llext_cflags: Additional flags to be added to the generated flags.
21+
# - llext_edk_cflags: Flags to be used for source compile commands.
2222
# - ZEPHYR_BASE: Path to the zephyr base directory.
2323
# - WEST_TOPDIR: Path to the west top directory.
2424
# - 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})
9393
string(TOUPPER ${llext_edk_name_sane} llext_edk_name_sane)
9494
set(install_dir_var "${llext_edk_name_sane}_INSTALL_DIR")
9595

96-
separate_arguments(llext_cflags NATIVE_COMMAND ${llext_cflags})
96+
separate_arguments(llext_edk_cflags NATIVE_COMMAND ${llext_edk_cflags})
9797

9898
set(make_relative FALSE)
99-
foreach(flag ${llext_cflags})
99+
foreach(flag ${llext_edk_cflags})
100100
if (flag STREQUAL "-imacros")
101101
set(make_relative TRUE)
102102
elseif (make_relative)
@@ -116,11 +116,10 @@ foreach(flag ${llext_cflags})
116116
list(APPEND new_cflags ${flag})
117117
endif()
118118
endforeach()
119-
set(llext_cflags ${new_cflags})
119+
set(llext_edk_cflags ${new_cflags})
120120

121-
122-
list(APPEND base_flags_make ${llext_cflags} ${imacros_make} -DLL_EXTENSION_BUILD)
123-
list(APPEND base_flags_cmake ${llext_cflags} ${imacros_cmake} -DLL_EXTENSION_BUILD)
121+
list(APPEND base_flags_make ${llext_edk_cflags} ${imacros_make} -DLL_EXTENSION_BUILD)
122+
list(APPEND base_flags_cmake ${llext_edk_cflags} ${imacros_cmake} -DLL_EXTENSION_BUILD)
124123

125124
separate_arguments(include_dirs NATIVE_COMMAND ${INTERFACE_INCLUDE_DIRECTORIES})
126125
file(MAKE_DIRECTORY ${llext_edk_inc})

0 commit comments

Comments
 (0)