public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Liming Gao <liming.gao@intel.com>
To: edk2-devel@lists.01.org
Subject: [Patch] BaseTools: Support /WHOLEARCHIVE option in VS2015 tool chain
Date: Thu, 24 Aug 2017 12:38:01 +0800	[thread overview]
Message-ID: <1503549481-8016-1-git-send-email-liming.gao@intel.com> (raw)

https://bugzilla.tianocore.org/show_bug.cgi?id=582

Don't enable this option in the default setting, because it may cause VS2015
linker crash. Platform can enable this option in PlatformPkg.dsc like below:
[BuildOptions]
*_*_*_DLINK2_FLAGS = /WHOLEARCHIVE

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
---
 BaseTools/Conf/build_rule.template | 1 +
 BaseTools/Conf/tools_def.template  | 6 +++++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/BaseTools/Conf/build_rule.template b/BaseTools/Conf/build_rule.template
index 1db94b6..d8c8253 100755
--- a/BaseTools/Conf/build_rule.template
+++ b/BaseTools/Conf/build_rule.template
@@ -289,6 +289,7 @@
         $(DEBUG_DIR)(+)$(MODULE_NAME).dll
 
     <Command.MSFT, Command.INTEL>
+        "$(DLINK)" /OUT:${dst} $(DLINK_FLAGS) $(DLINK2_FLAGS) $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST)
         "$(DLINK)" /OUT:${dst} $(DLINK_FLAGS) $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST)
 
     <Command.GCC>
diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
index 1fa3ca3..e0ef4b1 100755
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -575,7 +575,7 @@ DEFINE SOURCERY_CYGWIN_TOOLS = /cygdrive/c/Program Files/CodeSourcery/Sourcery G
 #                               Intel(r) ACPI Compiler (iasl.exe) from
 #                               https://acpica.org/downloads
 #   VS2015x86   -win64-  Requires:
-#                             Microsoft Visual Studio 2015 (x86) Professional Edition
+#                             Microsoft Visual Studio 2015 (x86) Update 2 or above
 #                             Microsoft Windows Server 2003 Driver Development Kit (Microsoft WINDDK) version 3790.1830
 #                        Optional:
 #                             Required to build platforms or ACPI tables:
@@ -3605,6 +3605,7 @@ NOOPT_VS2013x86xASL_X64_DLINK_FLAGS    = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT
 *_VS2015_*_APP_FLAGS              = /nologo /E /TC
 *_VS2015_*_PP_FLAGS               = /nologo /E /TC /FIAutoGen.h
 *_VS2015_*_VFRPP_FLAGS            = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h
+*_VS2015_*_DLINK2_FLAGS           =
 
 *_VS2015_*_ASM16_PATH             = DEF(VS2015_BIN)\ml.exe
 
@@ -3723,6 +3724,7 @@ NOOPT_VS2015_X64_DLINK_FLAGS  = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT
 *_VS2015xASL_*_APP_FLAGS       = /nologo /E /TC
 *_VS2015xASL_*_PP_FLAGS        = /nologo /E /TC /FIAutoGen.h
 *_VS2015xASL_*_VFRPP_FLAGS     = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h
+*_VS2015xASL_*_DLINK2_FLAGS    =
 
 *_VS2015xASL_*_ASM16_PATH      = DEF(VS2015_BIN)\ml.exe
 
@@ -3839,6 +3841,7 @@ NOOPT_VS2015xASL_X64_DLINK_FLAGS    = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:RE
 *_VS2015x86_*_APP_FLAGS       = /nologo /E /TC
 *_VS2015x86_*_PP_FLAGS        = /nologo /E /TC /FIAutoGen.h
 *_VS2015x86_*_VFRPP_FLAGS     = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h
+*_VS2015x86_*_DLINK2_FLAGS    =
 
 *_VS2015x86_*_ASM16_PATH      = DEF(VS2015x86_BIN)\ml.exe
 
@@ -3954,6 +3957,7 @@ NOOPT_VS2015x86_X64_DLINK_FLAGS    = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF
 *_VS2015x86xASL_*_APP_FLAGS       = /nologo /E /TC
 *_VS2015x86xASL_*_PP_FLAGS        = /nologo /E /TC /FIAutoGen.h
 *_VS2015x86xASL_*_VFRPP_FLAGS     = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h
+*_VS2015x86xASL_*_DLINK2_FLAGS    =
 
 *_VS2015x86xASL_*_ASM16_PATH      = DEF(VS2015x86_BIN)\ml.exe
 
-- 
2.8.0.windows.1



             reply	other threads:[~2017-08-24  4:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-24  4:38 Liming Gao [this message]
2017-08-25  3:05 ` [Patch] BaseTools: Support /WHOLEARCHIVE option in VS2015 tool chain Zhu, Yonghong

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=1503549481-8016-1-git-send-email-liming.gao@intel.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