The EmulatorPkg WinHost.inf current uses '==' syntax in the [BuildOptions] section to override all the CC_FLAGS for MSFT compilers. MSFT:*_*_*_CC_FLAGS == /nologo /W4 /WX /Gy /c /D UNICODE /Od /Oy- /FIAutoGen.h /EHs-c- /GF /Gs8192 /Zi /Gm /D _CRT_SECURE_NO_WARNINGS /D _CRT_SECURE_NO_DEPRECATE This includes enabling debug information using /Zi. The debug information is already being set to the correct options from toold_def.txt for MSFT compilers based on DEBUG, RELEASE, or NOOPT build targets. The use of '==' also prevents flags to be customized from the EmulatorPkg DSC file. The /Gm option is also specified which is a deprecated flag which should be removed. The /Gs8192 flag is also overriding the default setting from tools_def.txt that is already set to the larger size using /Gs32768. WinHost.inf should be updated to use '=' and remove the /Zi, /Gm, and /Gs8192 options. This change has the added benefit of allowing the CompareBuild tool to support comparing the EmulatorPkg for VS2019 builds. The use of '==' that enables /Zi can not be disabled by CompareBuild because there is no flag to disable debug information once it is enabled earlier in the option list.
Assign to owner
Github PR Merged: https://github.com/tianocore/edk2/pull/2215 Commit: https://github.com/tianocore/edk2/pull/2215/commits/3b07938b5b0c9a9228af9c3ed03b473f78498b5f Email code review: https://edk2.groups.io/g/devel/message/83974