Reporting Issues
Bug 3747 - Update EmulatorPkg Win Host [BuildOptions] MSFT CC_FLAGS to not force debug information
Summary: Update EmulatorPkg Win Host [BuildOptions] MSFT CC_FLAGS to not force debug i...
Status: RESOLVED FIXED
Alias: None
Product: EDK2
Classification: Unclassified
Component: Code (show other bugs)
Version: Current
Hardware: All All
: Lowest normal
Assignee: Michael Kinney
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-23 12:17 UTC by Michael Kinney
Modified: 2022-01-14 20:23 UTC (History)
3 users (show)

See Also:
EDK II Code First industry standard specifications: ---
Branch URL:
Release(s) the issue is observed: EDK II Master
The OS the target platform is running: ---
Package: EmulatorPkg
Release(s) the issues must be fixed: EDK II Master
Tianocore documents:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Kinney 2021-11-23 12:17:59 UTC
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.
Comment 1 Michael Kinney 2021-11-23 12:22:41 UTC
Assign to owner