public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Roman Agafonov <Roman.Agafonov@aquantia.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: Bob Feng <bob.c.feng@intel.com>,
	Liming Gao <liming.gao@intel.com>,
	Yonghong Zhu <yonghong.zhu@intel.com>
Subject: [PATCH v1 1/1] BaseTools: don't use WHOLEARCHIVE linker flag for VS2017 toolchain
Date: Tue, 4 Jun 2019 15:41:17 +0000	[thread overview]
Message-ID: <20190604154059.30380-2-roman.agafonov@aquantia.com> (raw)
In-Reply-To: <20190604154059.30380-1-roman.agafonov@aquantia.com>

I have noticed the resulting binaries are about twice as large when
using VS2017 toolchain compared to the ones built with VS2015. It appears
this is caused by /WHOLEARCHIVE linker flag used by this toolchain. This
flag was previously removed from VS2015 toolchain due to compatibility
issues. I believe it should not be used with VS2017 as well.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Signed-off-by: Roman Agafonov <roman.agafonov@aquantia.com>
---
 BaseTools/Conf/tools_def.template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
index 26a2cf604f74..482a526f3052 100755
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -1545,7 +1545,7 @@ NOOPT_VS2015x86_X64_DLINK_FLAGS    = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF
 *_VS2017_*_APP_FLAGS       = /nologo /E /TC
 *_VS2017_*_PP_FLAGS        = /nologo /E /TC /FIAutoGen.h
 *_VS2017_*_VFRPP_FLAGS     = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h
-*_VS2017_*_DLINK2_FLAGS    = /WHOLEARCHIVE
+*_VS2017_*_DLINK2_FLAGS    =
 *_VS2017_*_ASM16_PATH      = DEF(VS2017_BIN_IA32)\ml.exe
 
 ##################
-- 
2.9.0.windows.1


  reply	other threads:[~2019-06-04 15:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-04 15:41 [PATCH v1 0/1] BaseTools: don't use WHOLEARCHIVE linker flag for VS2017 toolchain Roman Agafonov
2019-06-04 15:41 ` Roman Agafonov [this message]
2019-06-04 15:54   ` [PATCH v1 1/1] " Liming Gao
2019-06-04 17:20     ` Roman Agafonov
2019-06-05 15:47       ` Liming Gao
2019-06-06 12:20         ` Roman Agafonov
2019-06-06 14:06           ` Liming Gao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190604154059.30380-2-roman.agafonov@aquantia.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox