mirror of https://github.com/acidanthera/audk.git
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> |
||
---|---|---|
.. | ||
XMLSchema | ||
Empty_C_File_Host_Application_Build.c | ||
Empty_Package_Information_Data_File.ini | ||
ReadMe.txt | ||
build_rule.template | ||
diff.order | ||
gitattributes | ||
target.template | ||
tools_def.template |
ReadMe.txt
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.