Skip to content

Commit

Permalink
BaseTools: Support /WHOLEARCHIVE option in VS2015 tool chain
Browse files Browse the repository at this point in the history
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>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
  • Loading branch information
lgao4 committed Aug 29, 2017
1 parent 51ce27f commit 578211b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions BaseTools/Conf/build_rule.template
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
6 changes: 5 additions & 1 deletion BaseTools/Conf/tools_def.template
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 578211b

Please sign in to comment.