Skip to content

Commit

Permalink
Decrease compile time with nanostack-libservice
Browse files Browse the repository at this point in the history
nanostack-libservice involves two parts: common (e.g. libip4string) and
nanostack-specific (e.g. nvmHelper). For nanostack-specific, it needs to
link nanostack hal and will pull in 200+ nanostack files for compile.
This is unnecessary for common only application e.g. lwstack. To fix this,
the following strategy is applied for nanostack-libservice cmake listfile:
1.  For compiling nanostack-specific, it doesn't rely on nanostack hal
    because its needed header file has placed underneath (mbed-client-libservice
    /platform).
2.  For application needing the nanostack-specific, the nanostack cmake listfile
    shall specify the link dependency.
  • Loading branch information
ccli8 committed Nov 4, 2024
1 parent e72b38a commit 354dd7f
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions connectivity/libraries/nanostack-libservice/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ target_sources(mbed-nanostack-libservice
source/nvmHelper/ns_nvm_helper.c
)

target_link_libraries(mbed-nanostack-libservice PUBLIC mbed-nanostack-hal_mbed_cmsis_rtos)

# The definition, source files and include directories below
# are needed by mbed-trace which is part of the mbed-core CMake target
target_compile_definitions(mbed-core-flags
Expand Down

0 comments on commit 354dd7f

Please sign in to comment.