1
0
Fork 0
forked from nuttx/nuttx-update

dlcn:need select MODULES when compile

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
This commit is contained in:
anjiahao 2024-10-06 23:10:59 +08:00 committed by Xiang Xiao
parent 9ed93c6b1e
commit e9e01506d3
2 changed files with 11 additions and 8 deletions

View file

@ -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
@ -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})

View file

@ -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---