Merge branch 'fix/minimal_build_no_main_v6.0' into 'release/v6.0'

fix(build): ensure the main component exists when MINIMAL_BUILD is enabled (v6.0)

See merge request espressif/esp-idf!45915
This commit is contained in:
Jiang Jiang Jian
2026-03-20 10:32:22 +08:00
4 changed files with 40 additions and 1 deletions
+3
View File
@@ -264,6 +264,9 @@ The build system provides special treatment to the ``main`` component. It is a c
2. Set ``EXTRA_COMPONENT_DIRS`` in the project CMakeLists.txt to include the renamed ``main`` directory.
3. Specify the dependencies in the renamed component's CMakeLists.txt file via REQUIRES or PRIV_REQUIRES arguments :ref:`on component registration <cmake_minimal_component_cmakelists>`.
.. note::
A project without a ``main`` component cannot use the ``MINIMAL_BUILD`` :ref:`build property <cmake-build-properties>`, as this property explicitly relies on the presence of the ``main`` component. Ensure that the ``MINIMAL_BUILD`` build property is not set for projects that do not include a ``main`` component.
Overriding Default Build Specifications
---------------------------------------