mirror of
https://github.com/espressif/esp-idf.git
synced 2026-09-22 13:01:16 +03:00
fix(buildv2): include component-set LINK_OPTIONS as a GENERATOR_EXPRESSION
idf_build_library() captured the LINK_OPTIONS build property before including the components, so a link option a component appended while it was processed was dropped from the executable link. Read the property as a generator expression so these options are included.
This commit is contained in:
@@ -432,8 +432,10 @@ function(idf_build_library library)
|
||||
idf_build_get_property(include_directories INCLUDE_DIRECTORIES GENERATOR_EXPRESSION)
|
||||
target_include_directories("${library}" INTERFACE "${include_directories}")
|
||||
|
||||
# Add link options.
|
||||
idf_build_get_property(link_options LINK_OPTIONS)
|
||||
# Add link options. Read as a generator expression so that link options a
|
||||
# component appends to the LINK_OPTIONS build property while it is processed
|
||||
# below are included, not only those set before this point.
|
||||
idf_build_get_property(link_options LINK_OPTIONS GENERATOR_EXPRESSION)
|
||||
target_link_options(${library} INTERFACE "${link_options}")
|
||||
|
||||
# Include the requested components and link their interface targets to the
|
||||
|
||||
Reference in New Issue
Block a user