cmake: remove intermediary libraries for some component

This commit is contained in:
Renz Christian Bagaporo 2019-12-11 09:55:06 +08:00
parent 17876d3d73
commit f766866167
2 changed files with 2 additions and 6 deletions

View File

@ -38,7 +38,5 @@ idf_component_register(SRCS "${srcs}"
target_compile_options(${COMPONENT_LIB} PRIVATE "-fno-profile-arcs" "-fno-test-coverage") target_compile_options(${COMPONENT_LIB} PRIVATE "-fno-profile-arcs" "-fno-test-coverage")
# Force app_trace to also appear later than gcov in link line # Force app_trace to also appear later than gcov in link line
add_library(gcov_apptrace INTERFACE)
idf_component_get_property(app_trace app_trace COMPONENT_LIB) idf_component_get_property(app_trace app_trace COMPONENT_LIB)
target_link_libraries(gcov_apptrace INTERFACE $<TARGET_FILE:${app_trace}> gcov $<TARGET_FILE:${app_trace}>) target_link_libraries(${COMPONENT_LIB} INTERFACE $<TARGET_FILE:${app_trace}> gcov $<TARGET_FILE:${app_trace}> ${LIBC})
target_link_libraries(${COMPONENT_LIB} PUBLIC gcov_apptrace ${LIBC})

View File

@ -28,10 +28,8 @@ idf_component_register(SRCS "${srcs}"
LDFRAGMENTS "${ldfragments}") LDFRAGMENTS "${ldfragments}")
# Toolchain libraries require code defined in this component # Toolchain libraries require code defined in this component
add_library(extra INTERFACE)
idf_component_get_property(newlib newlib COMPONENT_LIB) idf_component_get_property(newlib newlib COMPONENT_LIB)
target_link_libraries(extra INTERFACE ${LIBC} ${LIBM} gcc "$<TARGET_FILE:${newlib}>") target_link_libraries(${COMPONENT_LIB} INTERFACE ${LIBC} ${LIBM} gcc "$<TARGET_FILE:${newlib}>")
target_link_libraries(${COMPONENT_LIB} PUBLIC extra)
set_source_files_properties(heap.c PROPERTIES COMPILE_FLAGS -fno-builtin) set_source_files_properties(heap.c PROPERTIES COMPILE_FLAGS -fno-builtin)