From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.93; helo=mga11.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 2090521B00DF3 for ; Mon, 20 Nov 2017 00:42:42 -0800 (PST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Nov 2017 00:46:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,426,1505804400"; d="scan'208";a="7228087" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga001.jf.intel.com with ESMTP; 20 Nov 2017 00:46:55 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 20 Nov 2017 00:46:54 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.152]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.218]) with mapi id 14.03.0319.002; Mon, 20 Nov 2017 16:46:52 +0800 From: "Gao, Liming" To: Pete Batard , "edk2-devel@lists.01.org" Thread-Topic: [PATCH v2 2/4] BaseTools: Add VS2017 tool chain in BaseTools tools_def.template Thread-Index: AQHTX6U6JtqbNkyg2ECmMbKyxd1Hs6Mc+EOg Date: Mon, 20 Nov 2017 08:46:52 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E18099E@SHSMSX104.ccr.corp.intel.com> References: <20171117130837.9164-1-pete@akeo.ie> <20171117130837.9164-3-pete@akeo.ie> In-Reply-To: <20171117130837.9164-3-pete@akeo.ie> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH v2 2/4] BaseTools: Add VS2017 tool chain in BaseTools tools_def.template X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Nov 2017 08:42:43 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Pete: Here, I suggest to mention VS version 15.2 or above, because vswhere.exe = depends on this version.=20 After later, you may also update this version to 15.4 for ARM and AARCH64= support.=20 >-----Original Message----- >From: Pete Batard [mailto:pete@akeo.ie] >Sent: Friday, November 17, 2017 9:09 PM >To: edk2-devel@lists.01.org >Cc: Gao, Liming >Subject: [PATCH v2 2/4] BaseTools: Add VS2017 tool chain in BaseTools >tools_def.template > >From: Liming Gao > >VS2017 tool chain enables /WHOLEARCHIVE linker option >Split host-related and arch-related elements > >Contributed-under: TianoCore Contribution Agreement 1.1 >Signed-off-by: Liming Gao >Signed-off-by: Pete Batard >--- > BaseTools/Conf/tools_def.template | 126 ++++++++++++++++++++ > 1 file changed, 126 insertions(+) > >diff --git a/BaseTools/Conf/tools_def.template >b/BaseTools/Conf/tools_def.template >index aebd7d558633..0e8f9e6cdbf1 100755 >--- a/BaseTools/Conf/tools_def.template >+++ b/BaseTools/Conf/tools_def.template >@@ -74,6 +74,12 @@ DEFINE VS2015x86_BIN =3D ENV(VS2015_PREFIX)Vc\bin > DEFINE VS2015x86_DLL =3D >ENV(VS2015_PREFIX)Common7\IDE;DEF(VS2015x86_BIN) > DEFINE VS2015x86_BINX64 =3D DEF(VS2015x86_BIN)\x86_amd64 > >+DEFINE VS2017_BIN =3D ENV(VS2017_PREFIX)bin >+DEFINE VS2017_HOST =3D x86 >+DEFINE VS2017_BIN_HOST =3D >DEF(VS2017_BIN)\HostDEF(VS2017_HOST)\DEF(VS2017_HOST) >+DEFINE VS2017_BIN_IA32 =3D DEF(VS2017_BIN)\HostDEF(VS2017_HOST)\x86 >+DEFINE VS2017_BIN_X64 =3D DEF(VS2017_BIN)\HostDEF(VS2017_HOST)\x64 >+ > DEFINE WINSDK_BIN =3D ENV(WINSDK_PREFIX) > DEFINE WINSDKx86_BIN =3D ENV(WINSDKx86_PREFIX) > >@@ -93,6 +99,9 @@ DEFINE WINSDK8x86_BIN =3D >ENV(WINSDK8x86_PREFIX)x64 > DEFINE WINSDK81_BIN =3D ENV(WINSDK81_PREFIX)x86\ > DEFINE WINSDK81x86_BIN =3D ENV(WINSDK81x86_PREFIX)x64 > >+# Microsoft Visual Studio 2017 Professional Edition >+DEFINE WINSDK10_BIN =3D ENV(WINSDK10_PREFIX)DEF(VS2017_HOST) >+ > # These defines are needed for certain Microsoft Visual Studio tools that > # are used by other toolchains. An example is that ICC on Windows normal= ly > # uses Microsoft's nmake.exe. >@@ -318,6 +327,14 @@ DEFINE DTC_BIN =3D ENV(DTC_PREFIX)dtc > # Required to build platforms or ACPI tables: > # Intel(r) ACPI Compiler (iasl.exe) from > # https://acpica.org/downloads >+# VS2017 -win32- Requires: >+# Microsoft Visual Studio 2017 Professional o= r Community >Edition >+# Optional: >+# Required to build EBC drivers: >+# Intel(r) Compiler for Efi Byte Code (Inte= l(r) EBC Compiler) >+# Required to build platforms or ACPI tables: >+# Intel(r) ACPI Compiler (iasl.exe) from >+# https://acpica.org/downloads > # DDK3790 -win32- Requires: > # Microsoft Windows Server 2003 Driver Develo= pment Kit >(Microsoft WINDDK) version 3790.1830 > # Optional: >@@ -4062,6 +4079,115 @@ NOOPT_VS2015x86xASL_X64_DLINK_FLAGS =3D >/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 =3D MSFT >+*_VS2017_*_*_DLL =3D DEF(VS2017_BIN_HOST) >+ >+*_VS2017_*_MAKE_PATH =3D DEF(VS2017_BIN_HOST)\nmake.exe >+*_VS2017_*_MAKE_FLAG =3D /nologo >+*_VS2017_*_RC_PATH =3D DEF(WINSDK10_BIN)\rc.exe >+ >+*_VS2017_*_MAKE_FLAGS =3D /nologo >+*_VS2017_*_SLINK_FLAGS =3D /NOLOGO /LTCG >+*_VS2017_*_APP_FLAGS =3D /nologo /E /TC >+*_VS2017_*_PP_FLAGS =3D /nologo /E /TC /FIAutoGen.h >+*_VS2017_*_VFRPP_FLAGS =3D /nologo /E /TC /DVFRCOMPILE >/FI$(MODULE_NAME)StrDefs.h >+*_VS2017_*_DLINK2_FLAGS =3D /WHOLEARCHIVE >+*_VS2017_*_ASM16_PATH =3D DEF(VS2017_BIN_IA32)\ml.exe >+ >+################## >+# ASL definitions >+################## >+*_VS2017_*_ASL_PATH =3D DEF(WIN_IASL_BIN) >+*_VS2017_*_ASL_FLAGS =3D DEF(DEFAULT_WIN_ASL_FLAGS) >+*_VS2017_*_ASL_OUTFLAGS =3D DEF(DEFAULT_WIN_ASL_OUTFLAGS) >+*_VS2017_*_ASLCC_FLAGS =3D DEF(MSFT_ASLCC_FLAGS) >+*_VS2017_*_ASLPP_FLAGS =3D DEF(MSFT_ASLPP_FLAGS) >+*_VS2017_*_ASLDLINK_FLAGS =3D DEF(MSFT_ASLDLINK_FLAGS) >+ >+################## >+# IA32 definitions >+################## >+*_VS2017_IA32_CC_PATH =3D DEF(VS2017_BIN_IA32)\cl.exe >+*_VS2017_IA32_VFRPP_PATH =3D DEF(VS2017_BIN_IA32)\cl.exe >+*_VS2017_IA32_ASLCC_PATH =3D DEF(VS2017_BIN_IA32)\cl.exe >+*_VS2017_IA32_ASLPP_PATH =3D DEF(VS2017_BIN_IA32)\cl.exe >+*_VS2017_IA32_SLINK_PATH =3D DEF(VS2017_BIN_IA32)\lib.exe >+*_VS2017_IA32_DLINK_PATH =3D DEF(VS2017_BIN_IA32)\link.exe >+*_VS2017_IA32_ASLDLINK_PATH=3D DEF(VS2017_BIN_IA32)\link.exe >+*_VS2017_IA32_APP_PATH =3D DEF(VS2017_BIN_IA32)\cl.exe >+*_VS2017_IA32_PP_PATH =3D DEF(VS2017_BIN_IA32)\cl.exe >+*_VS2017_IA32_ASM_PATH =3D DEF(VS2017_BIN_IA32)\ml.exe >+ >+ *_VS2017_IA32_MAKE_FLAGS =3D /nologo >+ DEBUG_VS2017_IA32_CC_FLAGS =3D /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 =3D /nologo /arch:IA32 /c /WX /GS- /W4 >/Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF >+NOOPT_VS2017_IA32_CC_FLAGS =3D /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 =3D /nologo /c /WX /W3 /Cx /coff /Zd /Zi >+RELEASE_VS2017_IA32_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /coff /Zd >+NOOPT_VS2017_IA32_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /coff /Zd /Zi >+ >+ DEBUG_VS2017_IA32_NASM_FLAGS =3D -Ox -f win32 -g >+RELEASE_VS2017_IA32_NASM_FLAGS =3D -Ox -f win32 >+NOOPT_VS2017_IA32_NASM_FLAGS =3D -O0 -f win32 -g >+ >+ DEBUG_VS2017_IA32_DLINK_FLAGS =3D /NOLOGO /NODEFAULTLIB >/IGNORE:4001 /OPT:REF /OPT:ICF=3D10 /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 =3D /NOLOGO /NODEFAULTLIB >/IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=3D10 /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=3D.data >+NOOPT_VS2017_IA32_DLINK_FLAGS =3D /NOLOGO /NODEFAULTLIB >/IGNORE:4001 /OPT:REF /OPT:ICF=3D10 /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_CC_PATH =3D DEF(VS2017_BIN_X64)\cl.exe >+*_VS2017_X64_PP_PATH =3D DEF(VS2017_BIN_X64)\cl.exe >+*_VS2017_X64_APP_PATH =3D DEF(VS2017_BIN_X64)\cl.exe >+*_VS2017_X64_VFRPP_PATH =3D DEF(VS2017_BIN_X64)\cl.exe >+*_VS2017_X64_ASLCC_PATH =3D DEF(VS2017_BIN_X64)\cl.exe >+*_VS2017_X64_ASLPP_PATH =3D DEF(VS2017_BIN_X64)\cl.exe >+*_VS2017_X64_ASM_PATH =3D DEF(VS2017_BIN_X64)\ml64.exe >+*_VS2017_X64_SLINK_PATH =3D DEF(VS2017_BIN_X64)\lib.exe >+*_VS2017_X64_DLINK_PATH =3D DEF(VS2017_BIN_X64)\link.exe >+*_VS2017_X64_ASLDLINK_PATH =3D DEF(VS2017_BIN_X64)\link.exe >+ >+ DEBUG_VS2017_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D >UNICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Zi /Gm >+RELEASE_VS2017_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D >UNICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF >+NOOPT_VS2017_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D >UNICODE /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Zi /Gm /Od >+ >+ DEBUG_VS2017_X64_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /Zd /Zi >+RELEASE_VS2017_X64_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /Zd >+NOOPT_VS2017_X64_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /Zd /Zi >+ >+ DEBUG_VS2017_X64_NASM_FLAGS =3D -Ox -f win64 -g >+RELEASE_VS2017_X64_NASM_FLAGS =3D -Ox -f win64 >+NOOPT_VS2017_X64_NASM_FLAGS =3D -O0 -f win64 -g >+ >+ DEBUG_VS2017_X64_DLINK_FLAGS =3D /NOLOGO /NODEFAULTLIB >/IGNORE:4001 /OPT:REF /OPT:ICF=3D10 /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 =3D /NOLOGO /NODEFAULTLIB >/IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=3D10 /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=3D.data >+NOOPT_VS2017_X64_DLINK_FLAGS =3D /NOLOGO /NODEFAULTLIB >/IGNORE:4001 /OPT:REF /OPT:ICF=3D10 /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 =3D INTEL >+ >+*_VS2017_EBC_PP_PATH =3D DEF(EBC_BINx86)\iec.exe >+*_VS2017_EBC_VFRPP_PATH =3D DEF(EBC_BINx86)\iec.exe >+*_VS2017_EBC_CC_PATH =3D DEF(EBC_BINx86)\iec.exe >+*_VS2017_EBC_SLINK_PATH =3D DEF(VS2017_BIN_IA32)\link.exe >+*_VS2017_EBC_DLINK_PATH =3D DEF(VS2017_BIN_IA32)\link.exe >+ >+*_VS2017_EBC_MAKE_FLAGS =3D /nologo >+*_VS2017_EBC_PP_FLAGS =3D /nologo /E /TC /FIAutoGen.h >+*_VS2017_EBC_CC_FLAGS =3D /nologo /c /WX /W3 /FIAutoGen.h >/D$(MODULE_ENTRY_POINT)=3D$(ARCH_ENTRY_POINT) >+*_VS2017_EBC_VFRPP_FLAGS =3D /nologo /E /TC /DVFRCOMPILE >/FI$(MODULE_NAME)StrDefs.h >+*_VS2017_EBC_SLINK_FLAGS =3D /lib /NOLOGO /MACHINE:EBC >+*_VS2017_EBC_DLINK_FLAGS =3D "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 T= ime >Code Generation) > # And Intel ACPI Compiler >-- >2.9.3.windows.2