mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
[log]: Normal log works on Linux now
* also removed strlcpy dependency from log * added Kconfig option for linux target Closes IDF-3245
This commit is contained in:
@@ -1,15 +1,23 @@
|
||||
list(APPEND srcs "log.c"
|
||||
"log_buffers.c")
|
||||
idf_build_get_property(target IDF_TARGET)
|
||||
set(srcs "log.c")
|
||||
if(${target} STREQUAL "linux")
|
||||
# We leave log buffers out for now on Linux since it's rarely used
|
||||
list(APPEND srcs "log_linux.c")
|
||||
else()
|
||||
list(APPEND srcs "log_buffers.c")
|
||||
list(APPEND priv_requires soc)
|
||||
endif()
|
||||
|
||||
idf_component_register(SRCS ${srcs}
|
||||
INCLUDE_DIRS "include"
|
||||
LDFRAGMENTS linker.lf
|
||||
PRIV_REQUIRES soc)
|
||||
PRIV_REQUIRES ${priv_requires})
|
||||
|
||||
idf_build_get_property(build_components BUILD_COMPONENTS)
|
||||
# Ideally, FreeRTOS shouldn't be included into bootloader build, so the 2nd check should be unnecessary
|
||||
if(freertos IN_LIST BUILD_COMPONENTS AND NOT BOOTLOADER_BUILD)
|
||||
target_sources(${COMPONENT_TARGET} PRIVATE log_freertos.c)
|
||||
else()
|
||||
target_sources(${COMPONENT_TARGET} PRIVATE log_noos.c)
|
||||
if(NOT ${target} STREQUAL "linux")
|
||||
# Ideally, FreeRTOS shouldn't be included into bootloader build, so the 2nd check should be unnecessary
|
||||
if(freertos IN_LIST BUILD_COMPONENTS AND NOT BOOTLOADER_BUILD)
|
||||
target_sources(${COMPONENT_TARGET} PRIVATE log_freertos.c)
|
||||
else()
|
||||
target_sources(${COMPONENT_TARGET} PRIVATE log_noos.c)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user