@@ -219,6 +219,12 @@ Common build options
219219
220220- ``E ``: Boolean option to make warnings into errors. Default is 1.
221221
222+ When specifying higher warnings levels (``W=1 `` and higher), this option
223+ defaults to 0. This is done to encourage contributors to use them, as they
224+ are expected to produce warnings that would otherwise fail the build. New
225+ contributions are still expected to build with ``W=0 `` and ``E=1 `` (the
226+ default).
227+
222228- ``EL3_PAYLOAD_BASE ``: This option enables booting an EL3 payload instead of
223229 the normal boot flow. It must specify the entry point address of the EL3
224230 payload. Please refer to the "Booting an EL3 payload" section for more
@@ -955,6 +961,43 @@ Common build options
955961 regrouped and put in the root Makefile. This flag can take the values 0 to 3,
956962 each level enabling more warning options. Default is 0.
957963
964+ This option is closely related to the ``E `` option, which enables
965+ ``-Werror ``.
966+
967+ - ``W=0 `` (default)
968+
969+ Enables a wide assortment of warnings, most notably ``-Wall `` and
970+ ``-Wextra ``, as well as various bad practices and things that are likely to
971+ result in errors. Includes some compiler specific flags. No warnings are
972+ expected at this level for any build.
973+
974+ - ``W=1 ``
975+
976+ Enables warnings we want the generic build to include but are too time
977+ consuming to fix at the moment. It re-enables warnings taken out for
978+ ``W=0 `` builds (a few of the ``-Wextra `` additions). This level is expected
979+ to eventually be merged into ``W=0 ``. Some warnings are expected on some
980+ builds, but new contributions should not introduce new ones.
981+
982+ - ``W=2 `` (recommended)
983+
984+ Enables warnings we want the generic build to include but cannot be enabled
985+ due to external libraries. This level is expected to eventually be merged
986+ into ``W=0 ``. Lots of warnings are expected, primarily from external
987+ libraries like zlib and compiler-rt, but new controbutions should not
988+ introduce new ones.
989+
990+ - ``W=3 ``
991+
992+ Enables warnings that are informative but not necessary and generally too
993+ verbose and frequently ignored. A very large number of warnings are
994+ expected.
995+
996+ The exact set of warning flags depends on the compiler and TF-A warning
997+ level, however they are all succinctly set in the top-level Makefile. Please
998+ refer to the `GCC `_ or `Clang `_ documentation for more information on the
999+ individual flags.
1000+
9581001- ``WARMBOOT_ENABLE_DCACHE_EARLY `` : Boolean option to enable D-cache early on
9591002 the CPU after warm boot. This is applicable for platforms which do not
9601003 require interconnect programming to enable cache coherency (eg: single
@@ -1162,3 +1205,5 @@ Firmware update options
11621205.. _DEN0115 : https://developer.arm.com/docs/den0115/latest
11631206.. _PSA FW update specification : https://developer.arm.com/documentation/den0118/a/
11641207.. _PSA DRTM specification : https://developer.arm.com/documentation/den0113/a
1208+ .. _GCC : https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
1209+ .. _Clang : https://clang.llvm.org/docs/DiagnosticsReference.html
0 commit comments