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 2/4] BaseTools: Add VS2017 tool chain in BaseTools tools_def.template
Date: Wed, 18 Oct 2017 18:48:53 +0800	[thread overview]
Message-ID: <1508323735-14344-3-git-send-email-liming.gao@intel.com> (raw)
In-Reply-To: <1508323735-14344-1-git-send-email-liming.gao@intel.com>

VS2017 tool chain enables /WHOLEARCHIVE linker option

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
---
 BaseTools/Conf/tools_def.template | 122 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 122 insertions(+)

diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
index e93c2a0..b8889f7 100755
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -74,6 +74,10 @@ DEFINE VS2015x86_BIN    = ENV(VS2015_PREFIX)Vc\bin
 DEFINE VS2015x86_DLL    = ENV(VS2015_PREFIX)Common7\IDE;DEF(VS2015x86_BIN)
 DEFINE VS2015x86_BINX64 = DEF(VS2015x86_BIN)\x86_amd64
 
+DEFINE VS2017_BIN    = ENV(VS2017_PREFIX)
+DEFINE VS2017_DLL    = ENV(VS2017_PREFIX)
+DEFINE VS2017_BINX64 = ENV(VS2017X64_PREFIX)
+
 DEFINE WINSDK_BIN       = ENV(WINSDK_PREFIX)
 DEFINE WINSDKx86_BIN    = ENV(WINSDKx86_PREFIX)
 
@@ -93,6 +97,9 @@ DEFINE WINSDK8x86_BIN    = ENV(WINSDK8x86_PREFIX)x64
 DEFINE WINSDK81_BIN       = ENV(WINSDK81_PREFIX)x86\
 DEFINE WINSDK81x86_BIN    = ENV(WINSDK81x86_PREFIX)x64
 
+# Microsoft Visual Studio 2017 Professional Edition
+DEFINE WINSDK10_BIN       = ENV(WINSDK10_PREFIX)
+
 # These defines are needed for certain Microsoft Visual Studio tools that
 # are used by other toolchains.  An example is that ICC on Windows normally
 # uses Microsoft's nmake.exe.
@@ -4062,6 +4069,121 @@ NOOPT_VS2015x86xASL_X64_DLINK_FLAGS    = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT
 
 
 ####################################################################################
+#   VS2017       - Microsoft Visual Studio 2017 with Intel ASL
+#   ASL          - Intel ACPI Source Language Compiler (iasl.exe)
+####################################################################################
+#   VS2017           - Microsoft Visual Studio 2017 professional Edition with Intel ASL
+*_VS2017_*_*_FAMILY        = MSFT
+
+*_VS2017_*_MAKE_PATH       = DEF(VS2017_BIN)\nmake.exe
+*_VS2017_*_MAKE_FLAG       = /nologo
+*_VS2017_*_RC_PATH         = DEF(WINSDK10_BIN)\rc.exe
+
+*_VS2017_*_MAKE_FLAGS      = /nologo
+*_VS2017_*_SLINK_FLAGS     = /NOLOGO /LTCG
+*_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_*_ASM16_PATH      = DEF(VS2017_BIN)\ml.exe
+
+##################
+# ASL definitions
+##################
+*_VS2017_*_ASL_PATH        = DEF(WIN_IASL_BIN)
+*_VS2017_*_ASL_FLAGS       = DEF(DEFAULT_WIN_ASL_FLAGS)
+*_VS2017_*_ASL_OUTFLAGS    = DEF(DEFAULT_WIN_ASL_OUTFLAGS)
+*_VS2017_*_ASLCC_FLAGS     = DEF(MSFT_ASLCC_FLAGS)
+*_VS2017_*_ASLPP_FLAGS     = DEF(MSFT_ASLPP_FLAGS)
+*_VS2017_*_ASLDLINK_FLAGS  = DEF(MSFT_ASLDLINK_FLAGS)
+
+##################
+# IA32 definitions
+##################
+*_VS2017_IA32_*_DLL        = DEF(VS2017_DLL)
+
+*_VS2017_IA32_MAKE_PATH    = DEF(VS2017_BIN)\nmake.exe
+*_VS2017_IA32_CC_PATH      = DEF(VS2017_BIN)\cl.exe
+*_VS2017_IA32_VFRPP_PATH   = DEF(VS2017_BIN)\cl.exe
+*_VS2017_IA32_ASLCC_PATH   = DEF(VS2017_BIN)\cl.exe
+*_VS2017_IA32_ASLPP_PATH   = DEF(VS2017_BIN)\cl.exe
+*_VS2017_IA32_SLINK_PATH   = DEF(VS2017_BIN)\lib.exe
+*_VS2017_IA32_DLINK_PATH   = DEF(VS2017_BIN)\link.exe
+*_VS2017_IA32_ASLDLINK_PATH= DEF(VS2017_BIN)\link.exe
+*_VS2017_IA32_APP_PATH     = DEF(VS2017_BIN)\cl.exe
+*_VS2017_IA32_PP_PATH      = DEF(VS2017_BIN)\cl.exe
+*_VS2017_IA32_ASM_PATH     = DEF(VS2017_BIN)\ml.exe
+
+      *_VS2017_IA32_MAKE_FLAGS  = /nologo
+  DEBUG_VS2017_IA32_CC_FLAGS    = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm
+RELEASE_VS2017_IA32_CC_FLAGS    = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF
+NOOPT_VS2017_IA32_CC_FLAGS      = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D UNICODE /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm /Od
+
+  DEBUG_VS2017_IA32_ASM_FLAGS   = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
+RELEASE_VS2017_IA32_ASM_FLAGS   = /nologo /c /WX /W3 /Cx /coff /Zd
+NOOPT_VS2017_IA32_ASM_FLAGS     = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
+
+  DEBUG_VS2017_IA32_NASM_FLAGS  = -Ox -f win32 -g
+RELEASE_VS2017_IA32_NASM_FLAGS  = -Ox -f win32
+NOOPT_VS2017_IA32_NASM_FLAGS    = -O0 -f win32 -g
+
+  DEBUG_VS2017_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+RELEASE_VS2017_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
+NOOPT_VS2017_IA32_DLINK_FLAGS   = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+
+##################
+# X64 definitions
+##################
+*_VS2017_X64_*_DLL         = DEF(VS2017_DLL)
+
+*_VS2017_X64_CC_PATH       = DEF(VS2017_BINX64)\cl.exe
+*_VS2017_X64_PP_PATH       = DEF(VS2017_BINX64)\cl.exe
+*_VS2017_X64_APP_PATH      = DEF(VS2017_BINX64)\cl.exe
+*_VS2017_X64_VFRPP_PATH    = DEF(VS2017_BINX64)\cl.exe
+*_VS2017_X64_ASLCC_PATH    = DEF(VS2017_BINX64)\cl.exe
+*_VS2017_X64_ASLPP_PATH    = DEF(VS2017_BINX64)\cl.exe
+*_VS2017_X64_ASM_PATH      = DEF(VS2017_BINX64)\ml64.exe
+*_VS2017_X64_SLINK_PATH    = DEF(VS2017_BINX64)\lib.exe
+*_VS2017_X64_DLINK_PATH    = DEF(VS2017_BINX64)\link.exe
+*_VS2017_X64_ASLDLINK_PATH = DEF(VS2017_BINX64)\link.exe
+
+  DEBUG_VS2017_X64_CC_FLAGS     = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Zi /Gm
+RELEASE_VS2017_X64_CC_FLAGS     = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF
+NOOPT_VS2017_X64_CC_FLAGS       = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Zi /Gm /Od
+
+  DEBUG_VS2017_X64_ASM_FLAGS    = /nologo /c /WX /W3 /Cx /Zd /Zi
+RELEASE_VS2017_X64_ASM_FLAGS    = /nologo /c /WX /W3 /Cx /Zd
+NOOPT_VS2017_X64_ASM_FLAGS      = /nologo /c /WX /W3 /Cx /Zd /Zi
+
+  DEBUG_VS2017_X64_NASM_FLAGS   = -Ox -f win64 -g
+RELEASE_VS2017_X64_NASM_FLAGS   = -Ox -f win64
+NOOPT_VS2017_X64_NASM_FLAGS     = -O0 -f win64 -g
+
+  DEBUG_VS2017_X64_DLINK_FLAGS  = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+RELEASE_VS2017_X64_DLINK_FLAGS  = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
+NOOPT_VS2017_X64_DLINK_FLAGS    = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+
+##################
+# EBC definitions
+##################
+*_VS2017_EBC_*_FAMILY            = INTEL
+*_VS2017_EBC_*_DLL               = DEF(VS2017_DLL)
+
+*_VS2017_EBC_MAKE_PATH           = DEF(VS2017_BIN)\nmake.exe
+*_VS2017_EBC_PP_PATH             = DEF(EBC_BINx86)\iec.exe
+*_VS2017_EBC_VFRPP_PATH          = DEF(EBC_BINx86)\iec.exe
+*_VS2017_EBC_CC_PATH             = DEF(EBC_BINx86)\iec.exe
+*_VS2017_EBC_SLINK_PATH          = DEF(VS2017_BIN)\link.exe
+*_VS2017_EBC_DLINK_PATH          = DEF(VS2017_BIN)\link.exe
+
+*_VS2017_EBC_MAKE_FLAGS          = /nologo
+*_VS2017_EBC_PP_FLAGS            = /nologo /E /TC /FIAutoGen.h
+*_VS2017_EBC_CC_FLAGS            = /nologo /c /WX /W3 /FIAutoGen.h /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT)
+*_VS2017_EBC_VFRPP_FLAGS         = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h
+*_VS2017_EBC_SLINK_FLAGS         = /lib /NOLOGO /MACHINE:EBC
+*_VS2017_EBC_DLINK_FLAGS         = "C:\Program Files (x86)\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP /ALIGN:32 /DRIVER
+
+####################################################################################
 #
 # Microsoft Device Driver Kit 3790.1830 (IA-32, X64, Itanium, with Link Time Code Generation)
 # And Intel ACPI Compiler
-- 
2.8.0.windows.1



  parent reply	other threads:[~2017-10-18 11:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-18 10:48 [Patch 0/4] Add VS2017 tool chain for evaluation Liming Gao
2017-10-18 10:48 ` [Patch 1/4] MdePkg: Disable VS warning 4701 & 4703 for VS2017 Liming Gao
2017-10-19  2:26   ` Ni, Ruiyu
2017-10-18 10:48 ` Liming Gao [this message]
2017-10-18 10:48 ` [Patch 3/4] BaseTools: Update VS batch file to auto detect VS2017 Liming Gao
2017-10-18 10:48 ` [Patch 4/4] Nt32Pkg: Add VS2017 support in SecMain 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=1508323735-14344-3-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