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.88; helo=mga01.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (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 F3E2421B00DC1 for ; Thu, 16 Nov 2017 06:44:02 -0800 (PST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Nov 2017 06:48:11 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,404,1505804400"; d="scan'208";a="5722901" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga001.jf.intel.com with ESMTP; 16 Nov 2017 06:48:11 -0800 Received: from fmsmsx115.amr.corp.intel.com (10.18.116.19) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 16 Nov 2017 06:48:11 -0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx115.amr.corp.intel.com (10.18.116.19) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 16 Nov 2017 06:48:10 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.152]) by shsmsx102.ccr.corp.intel.com ([169.254.2.175]) with mapi id 14.03.0319.002; Thu, 16 Nov 2017 22:48:09 +0800 From: "Gao, Liming" To: Pete Batard , "edk2-devel@lists.01.org" Thread-Topic: [edk2] [PATCH 1/1] BaseTools: Use VS2017 SDK path if defined and reorganize variables Thread-Index: AQHTXt3VQ8DUB6xvV02y2ui55PNkR6MXFAVw Date: Thu, 16 Nov 2017 14:48:08 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E17F40A@SHSMSX104.ccr.corp.intel.com> References: <20171116132110.11060-1-pete@akeo.ie> <20171116132110.11060-2-pete@akeo.ie> In-Reply-To: <20171116132110.11060-2-pete@akeo.ie> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH 1/1] BaseTools: Use VS2017 SDK path if defined and reorganize variables 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: Thu, 16 Nov 2017 14:44:03 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I agree to separate HOST and ARCH. For this patch, I have minor comment on = WINSDK10_BIN.=20 DEFINE WINSDK10_BIN =3D ENV(WINSDK10_PREFIX)x86 =3D=3D> DEFINE WINSDK10_BIN =3D ENV(WINSDK10_PREFIX)DEF(VS2017_HOST) Thanks Liming > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Pe= te Batard > Sent: Thursday, November 16, 2017 9:21 PM > To: edk2-devel@lists.01.org > Cc: Gao, Liming > Subject: [edk2] [PATCH 1/1] BaseTools: Use VS2017 SDK path if defined and= reorganize variables >=20 > 1. The use of WindowsSdkVerBinPath allows us to access the latest SDK, > which we will need when we introduce VS2017 support for AARCH64. > 2. Make the breakdown between host and target more explicit, and more in > line with how Microsoft reorganized the latest Visual Studio > toolchains, by introducing explicit and separate _HOST and _ > variables. > 3. Factorize _DLL and _MAKE_PATH as these are host rather than arch > dependent. >=20 > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Pete Batard > --- > BaseTools/Conf/tools_def.template | 66 ++++++++++++++++++---------------= ------ > BaseTools/set_vsprefix_envs.bat | 15 ++++----- > 2 files changed, 39 insertions(+), 42 deletions(-) >=20 > diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def= .template > index 4af883463d4f..ad900d821e65 100755 > --- a/BaseTools/Conf/tools_def.template > +++ b/BaseTools/Conf/tools_def.template > @@ -74,9 +74,11 @@ 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 >=20 > -DEFINE VS2017_BIN =3D ENV(VS2017_PREFIX) > -DEFINE VS2017_DLL =3D ENV(VS2017_PREFIX) > -DEFINE VS2017_BINX64 =3D ENV(VS2017X64_PREFIX) > +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(V= S2017_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 >=20 > DEFINE WINSDK_BIN =3D ENV(WINSDK_PREFIX) > DEFINE WINSDKx86_BIN =3D ENV(WINSDKx86_PREFIX) > @@ -98,7 +100,7 @@ DEFINE WINSDK81_BIN =3D ENV(WINSDK81_PREFIX)x86\ > DEFINE WINSDK81x86_BIN =3D ENV(WINSDK81x86_PREFIX)x64 >=20 > # Microsoft Visual Studio 2017 Professional Edition > -DEFINE WINSDK10_BIN =3D ENV(WINSDK10_PREFIX) > +DEFINE WINSDK10_BIN =3D ENV(WINSDK10_PREFIX)x86 >=20 > # These defines are needed for certain Microsoft Visual Studio tools tha= t > # are used by other toolchains. An example is that ICC on Windows norma= lly > @@ -4074,8 +4076,9 @@ NOOPT_VS2015x86xASL_X64_DLINK_FLAGS =3D /NOLOGO = /NODEFAULTLIB /IGNORE:4001 /OPT > ########################################################################= ############ > # VS2017 - Microsoft Visual Studio 2017 professional Edition= with Intel ASL > *_VS2017_*_*_FAMILY =3D MSFT > +*_VS2017_*_*_DLL =3D DEF(VS2017_BIN_HOST) >=20 > -*_VS2017_*_MAKE_PATH =3D DEF(VS2017_BIN)\nmake.exe > +*_VS2017_*_MAKE_PATH =3D DEF(VS2017_BIN_HOST)\nmake.exe > *_VS2017_*_MAKE_FLAG =3D /nologo > *_VS2017_*_RC_PATH =3D DEF(WINSDK10_BIN)\rc.exe >=20 > @@ -4085,7 +4088,7 @@ NOOPT_VS2015x86xASL_X64_DLINK_FLAGS =3D /NOLOGO = /NODEFAULTLIB /IGNORE:4001 /OPT > *_VS2017_*_PP_FLAGS =3D /nologo /E /TC /FIAutoGen.h > *_VS2017_*_VFRPP_FLAGS =3D /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_N= AME)StrDefs.h > *_VS2017_*_DLINK2_FLAGS =3D /WHOLEARCHIVE > -*_VS2017_*_ASM16_PATH =3D DEF(VS2017_BIN)\ml.exe > +*_VS2017_*_ASM16_PATH =3D DEF(VS2017_BIN_IA32)\ml.exe >=20 > ################## > # ASL definitions > @@ -4100,19 +4103,16 @@ NOOPT_VS2015x86xASL_X64_DLINK_FLAGS =3D /NOLOG= O /NODEFAULTLIB /IGNORE:4001 /OPT > ################## > # IA32 definitions > ################## > -*_VS2017_IA32_*_DLL =3D DEF(VS2017_DLL) > - > -*_VS2017_IA32_MAKE_PATH =3D DEF(VS2017_BIN)\nmake.exe > -*_VS2017_IA32_CC_PATH =3D DEF(VS2017_BIN)\cl.exe > -*_VS2017_IA32_VFRPP_PATH =3D DEF(VS2017_BIN)\cl.exe > -*_VS2017_IA32_ASLCC_PATH =3D DEF(VS2017_BIN)\cl.exe > -*_VS2017_IA32_ASLPP_PATH =3D DEF(VS2017_BIN)\cl.exe > -*_VS2017_IA32_SLINK_PATH =3D DEF(VS2017_BIN)\lib.exe > -*_VS2017_IA32_DLINK_PATH =3D DEF(VS2017_BIN)\link.exe > -*_VS2017_IA32_ASLDLINK_PATH=3D DEF(VS2017_BIN)\link.exe > -*_VS2017_IA32_APP_PATH =3D DEF(VS2017_BIN)\cl.exe > -*_VS2017_IA32_PP_PATH =3D DEF(VS2017_BIN)\cl.exe > -*_VS2017_IA32_ASM_PATH =3D DEF(VS2017_BIN)\ml.exe > +*_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 >=20 > *_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 > @@ -4134,18 +4134,16 @@ NOOPT_VS2017_IA32_DLINK_FLAGS =3D /NOLOGO /NODE= FAULTLIB /IGNORE:4001 /OPT:REF /O > ################## > # X64 definitions > ################## > -*_VS2017_X64_*_DLL =3D DEF(VS2017_DLL) > - > -*_VS2017_X64_CC_PATH =3D DEF(VS2017_BINX64)\cl.exe > -*_VS2017_X64_PP_PATH =3D DEF(VS2017_BINX64)\cl.exe > -*_VS2017_X64_APP_PATH =3D DEF(VS2017_BINX64)\cl.exe > -*_VS2017_X64_VFRPP_PATH =3D DEF(VS2017_BINX64)\cl.exe > -*_VS2017_X64_ASLCC_PATH =3D DEF(VS2017_BINX64)\cl.exe > -*_VS2017_X64_ASLPP_PATH =3D DEF(VS2017_BINX64)\cl.exe > -*_VS2017_X64_ASM_PATH =3D DEF(VS2017_BINX64)\ml64.exe > -*_VS2017_X64_SLINK_PATH =3D DEF(VS2017_BINX64)\lib.exe > -*_VS2017_X64_DLINK_PATH =3D DEF(VS2017_BINX64)\link.exe > -*_VS2017_X64_ASLDLINK_PATH =3D DEF(VS2017_BINX64)\link.exe > +*_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 >=20 > 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 > @@ -4167,14 +4165,12 @@ NOOPT_VS2017_X64_DLINK_FLAGS =3D /NOLOGO /NODE= FAULTLIB /IGNORE:4001 /OPT:REF /O > # EBC definitions > ################## > *_VS2017_EBC_*_FAMILY =3D INTEL > -*_VS2017_EBC_*_DLL =3D DEF(VS2017_DLL) >=20 > -*_VS2017_EBC_MAKE_PATH =3D DEF(VS2017_BIN)\nmake.exe > *_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)\link.exe > -*_VS2017_EBC_DLINK_PATH =3D DEF(VS2017_BIN)\link.exe > +*_VS2017_EBC_SLINK_PATH =3D DEF(VS2017_BIN_IA32)\link.exe > +*_VS2017_EBC_DLINK_PATH =3D DEF(VS2017_BIN_IA32)\link.exe >=20 > *_VS2017_EBC_MAKE_FLAGS =3D /nologo > *_VS2017_EBC_PP_FLAGS =3D /nologo /E /TC /FIAutoGen.h > diff --git a/BaseTools/set_vsprefix_envs.bat b/BaseTools/set_vsprefix_env= s.bat > index dbd4e986403b..9ff64dfd241d 100644 > --- a/BaseTools/set_vsprefix_envs.bat > +++ b/BaseTools/set_vsprefix_envs.bat > @@ -3,7 +3,7 @@ > @REM however it may be executed directly from the BaseTools project fo= lder > @REM if the file is not executed within a WORKSPACE\BaseTools folder. > @REM > -@REM Copyright (c) 2016, Intel Corporation. All rights reserved.
> +@REM Copyright (c) 2016-2017, Intel Corporation. All rights reserved. > @REM > @REM This program and the accompanying materials are licensed and made a= vailable > @REM under the terms and conditions of the BSD License which accompanies= this > @@ -107,15 +107,16 @@ if not defined VS150COMNTOOLS ( >=20 > if defined VCToolsInstallDir ( > if not defined VS2017_PREFIX ( > - set "VS2017_PREFIX=3D%VCToolsInstallDir%bin\HostX86\x86" > - set "VS2017X64_PREFIX=3D%VCToolsInstallDir%bin\HostX86\x64" > + set "VS2017_PREFIX=3D%VCToolsInstallDir%" > ) > ) > if not defined WINSDK10_PREFIX ( > - if exist "%ProgramFiles(x86)%\Windows Kits\10\bin\x86" ( > - set "WINSDK10_PREFIX=3D%ProgramFiles(x86)%\Windows Kits\10\bin\x86" > - ) else if exist "%ProgramFiles%\Windows Kits\10\bin\x86" ( > - set "WINSDK10_PREFIX=3D%ProgramFiles%\Windows Kits\10\bin\x86" > + if defined WindowsSdkVerBinPath ( > + set "WINSDK10_PREFIX=3D%WindowsSdkVerBinPath%" > + ) else if exist "%ProgramFiles(x86)%\Windows Kits\10\bin" ( > + set "WINSDK10_PREFIX=3D%ProgramFiles(x86)%\Windows Kits\10\bin" > + ) else if exist "%ProgramFiles%\Windows Kits\10\bin" ( > + set "WINSDK10_PREFIX=3D%ProgramFiles%\Windows Kits\10\bin" > ) > ) >=20 > -- > 2.9.3.windows.2 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel