config_tools: change representation of build types

Instead of using a Boolean variable indicating whether a build is for debug
or release, it is more intuitive to specify the build types as "debug" or
"release".

This patch converts the config item RELEASE to BUILD_TYPE which takes
"debug" or "release" as of now.

The generated header and makefile still uses RELEASE, and the command line
option RELEASE=<y or n> is also preserved.

Tracked-On: #6690
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
Junjie Mao
2022-02-25 21:59:48 +08:00
committed by acrnsi-robot
parent 7a1fbcf51f
commit 7ad9596dd6
28 changed files with 58 additions and 34 deletions

View File

@@ -741,12 +741,9 @@ example:
.. code-block:: xml
<xs:element name="RELEASE" type="Boolean" default="n">
<xs:annotation>
<xs:documentation>Build an image for release (``y``) or debug (``n``).
In a **release** image, assertions are not enforced and debugging
features are disabled, including logs, serial console, and the
hypervisor shell.</xs:documentation>
<xs:element name="BUILD_TYPE" type="BuildType" default="debug">
<xs:annotation acrn:title="Build type" acrn:views="basic">
<xs:documentation>Identify build type. Debug mode enables debug shell, prints, and logs. Release mode optimizes the ACRN binary for deployment and turns off all debug infrastructure. These can only be changed at build time.</xs:documentation>
</xs:annotation>
</xs:element>
@@ -755,8 +752,8 @@ in the ``.xsd`` files are extracted and transformed into reStructuredText using
an XSLT transformation found in ``doc/scripts/configdoc.xsl``. The generated
option documentation is organized and formatted to make it easy to create links
to specific option descriptions using an ``:option:`` role, for example,
``:option:`hv.DEBUG_OPTIONS.RELEASE``` would link to
:option:`hv.DEBUG_OPTIONS.RELEASE`.
``:option:`hv.DEBUG_OPTIONS.BUILD_TYPE``` would link to
:option:`hv.DEBUG_OPTIONS.BUILD_TYPE`.
The transformed option documentation is
created in the ``_build/rst/reference/configdoc.txt`` file and included by