audk/BaseTools/Conf
Oliver Smith-Denny 14cb48b0a0 BaseTools: Break Build on Linker Warnings
Today VS2022 and GCC are set to treat all compiler warnings as
errors and break the build. However, linker warnings for both
do not break the build. There are critical errors that can be
treated as warnings as the linker, such as not finding the
module entry point and use a default address as the entry
point. This will cause a runtime crash for something that
should be caught at build time.

This commit adds /WX to VS2022's DLINK_FLAGS and --fatal-warnings
to GCC's DLINK_FLAGS for IA32, X64, ARM, and AARCH64 in order to
break the build on linker warnings.

VS2022 linker warning 4210 is ignored for all builds because it
checks for static initializers and the linking of the VCRuntime.
edk2 never links the VCRuntime (except for HOST_APPLICATIONs) and
so the presence of static initializers will always cause this
warning, even when the edk2 code calls these initializers that
would otherwise be called in the _CRT_INIT function of the
VCRuntime. At the time of this commit, it only fails in CryptoPkg
for building OpenSSL, but could fail anywhere a static initializer
is used.

Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2025-01-22 19:47:20 +00:00
..
XMLSchema
Empty_C_File_Host_Application_Build.c BaseTools/Conf: Simplify VS20xx HOST_APPLICATION builds 2025-01-21 05:02:38 +00:00
Empty_Package_Information_Data_File.ini
ReadMe.txt
build_rule.template BaseTools/Conf: Simplify VS20xx HOST_APPLICATION builds 2025-01-21 05:02:38 +00:00
diff.order
gitattributes
target.template BaseTools: Add VS2022 XIPFLAGS 2024-12-10 23:42:09 +00:00
tools_def.template BaseTools: Break Build on Linker Warnings 2025-01-22 19:47:20 +00:00

ReadMe.txt

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This directory contains the template files for the next generation of the
EDK II Build infrastructure.  These files will be copied into the WORKSPACE's
Conf directory if and only if the target files do not exist.

These files may be updated frequently.

The XMLSchema directory contains the EDK II Packaging XML definitions.  The
schema may change in the future.  It differs somewhat from the early versions
of the XML Schema.