Skip to content

Commit

Permalink
dlcn:need select MODULES when compile
Browse files Browse the repository at this point in the history
Signed-off-by: anjiahao <[email protected]>
  • Loading branch information
anjiahao1 authored and xiaoxiang781216 committed Oct 8, 2024
1 parent 9ed93c6 commit e9e0150
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
18 changes: 10 additions & 8 deletions cmake/nuttx_add_application.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,16 @@ function(nuttx_add_application)

nuttx_add_library_internal(${TARGET})

# loadable build requires applying ELF flags to all applications

if(CONFIG_MODULES)
target_compile_options(
${TARGET}
PRIVATE
$<GENEX_EVAL:$<TARGET_PROPERTY:nuttx,NUTTX_ELF_APP_COMPILE_OPTIONS>>
)
endif()

install(TARGETS ${TARGET})
set_property(
TARGET nuttx
Expand All @@ -155,14 +165,6 @@ function(nuttx_add_application)
endif()
endif()

# loadable build requires applying ELF flags to all applications

if(CONFIG_MODULES)
target_compile_options(
${TARGET}
PRIVATE
$<GENEX_EVAL:$<TARGET_PROPERTY:nuttx,NUTTX_ELF_APP_COMPILE_OPTIONS>>)
endif()
else()
set(TARGET "apps_${NAME}")
add_custom_target(${TARGET})
Expand Down
1 change: 1 addition & 0 deletions libs/libc/dlfcn/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
config LIBC_DLFCN
bool "Shared library support"
default n
select MODULES
select LIBC_MODLIB if !BUILD_FLAT
select MODULE if BUILD_FLAT
---help---
Expand Down

0 comments on commit e9e0150

Please sign in to comment.