public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch 0/2] Add /Gw to CC_FLAGS for VS 2013 and higher tool chains
@ 2017-06-14  4:47 Yonghong Zhu
  2017-06-14  4:47 ` [Patch 1/2] BaseTools: add /Gw to CC_FLAGS for VS2013 and higher tool chain tags Yonghong Zhu
  2017-06-14  4:47 ` [Patch 2/2] MdePkg: update Base.h in MdePkg to check the _MSC_VER Yonghong Zhu
  0 siblings, 2 replies; 5+ messages in thread
From: Yonghong Zhu @ 2017-06-14  4:47 UTC (permalink / raw)
  To: edk2-devel; +Cc: Michael D Kinney, Liming Gao

The /Gw flag does a better job at size optimization than use of the
GLOBAL_REMOVE_IF_UNREFERENCED macro that is currently used for VS20xx
tool chains to remove unreferenced global variables.

The recommendation is to add /Gw to CC_FLAGS for VS2013 and higher
tool chain tags and update Base.h in MdePkg to check the _MSC_VER
and define GLOBAL_REMOVE_IF_UNREFERENCED to nothing for VS2013 and
higher tool chain tags.

Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=583
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>


Yonghong Zhu (2):
  BaseTools: add /Gw to CC_FLAGS for VS2013 and higher tool chain tags
  MdePkg: update Base.h in MdePkg to check the _MSC_VER

 BaseTools/Conf/tools_def.template | 110 +++++++++++++++++++-------------------
 MdePkg/Include/Base.h             |   2 +-
 2 files changed, 56 insertions(+), 56 deletions(-)

-- 
2.6.1.windows.1



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-06-14  7:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-14  4:47 [Patch 0/2] Add /Gw to CC_FLAGS for VS 2013 and higher tool chains Yonghong Zhu
2017-06-14  4:47 ` [Patch 1/2] BaseTools: add /Gw to CC_FLAGS for VS2013 and higher tool chain tags Yonghong Zhu
2017-06-14  6:50   ` Kinney, Michael D
2017-06-14  7:37     ` Zhu, Yonghong
2017-06-14  4:47 ` [Patch 2/2] MdePkg: update Base.h in MdePkg to check the _MSC_VER Yonghong Zhu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox