mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
fix(cmakev2/kconfig): suppress transient kconfgen warnings during component manager runs
kconfgen runs while the component manager iterates to convergence. Those passes operate on partial component sets and emit "unknown kconfig symbol" warnings for symbols defined in not-yet-downloaded components — idf-build-apps treats those as build failures. Suppress kconfgen output on the intermediate passes; only the final pass against the converged set emits warnings.
This commit is contained in:
@@ -51,6 +51,14 @@ endfunction()
|
||||
3. If the component manager run failed, error out.
|
||||
#]]
|
||||
function(__fetch_components_from_registry)
|
||||
# __KCONFGEN_QUIET stays YES (set by the bootstrap path in project.cmake)
|
||||
# across intermediate iterations of the loop below, because each
|
||||
# iteration's kconfgen pass runs against a partial component set when the
|
||||
# component manager exits 10. Warnings from those passes are transient.
|
||||
# We only flip the flag to NO on the iteration where the component
|
||||
# manager succeeds, so the final kconfgen pass against the complete
|
||||
# component set emits genuine warnings.
|
||||
|
||||
# Iteratively run the component manager and Kconfig until stable or error out.
|
||||
set(__cmgr_round 0)
|
||||
while(TRUE)
|
||||
@@ -60,6 +68,11 @@ function(__fetch_components_from_registry)
|
||||
# Run the component manager for all discovered components
|
||||
__download_component_level_managed_components(RESULT cmgr_result)
|
||||
|
||||
# Only the final (successful) iteration should emit kconfgen warnings.
|
||||
if(cmgr_result EQUAL 0)
|
||||
idf_build_set_property(__KCONFGEN_QUIET NO)
|
||||
endif()
|
||||
|
||||
# Re-collect Kconfig and regenerate sdkconfig with managed components included
|
||||
__generate_sdkconfig()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user