public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 0/1] Update for the 2017-10-18 VS2017 proposal
@ 2017-11-16 13:21 Pete Batard
  2017-11-16 13:21 ` [PATCH 1/1] BaseTools: Use VS2017 SDK path if defined and reorganize variables Pete Batard
  0 siblings, 1 reply; 4+ messages in thread
From: Pete Batard @ 2017-11-16 13:21 UTC (permalink / raw)
  To: edk2-devel; +Cc: liming.gao

The following is a set of changes that I'd like to see applied to Liming's
2017-10-18 VS2017 support proposal for IA32 and X64.
(See https://lists.01.org/pipermail/edk2-devel/2017-October/016175.html)

Since I am planning to submit a v2 of my VS2017 ARM/AARCH64 proposal, that
relies on these alterations, I am sending this preliminary patch for review.

The 3 main changes that are being introduced from the existing proposal are:
1. The use of %WindowsSdkVerBinPath% if defined, to locate the most recent
   version of the Windows 10 SDK. The fact that vcvars32.bat should have been
   called should usually ensure that this variable has been set, which in turn
   should ensure that we can access the required ARM64 tools and libraries. Of
   course, if the variable is not defined, the fallback to the hardcoded SDK
   top directory should still work fine for IA32 and X64.
2. Follow the way Microsoft structured the Visual Studio 2017 toolchains by
   introducing a specific VS2017_BIN_HOST, for host-specific elements, that is
   separate from the various VS2017_BIN_<ARCH> targets. I believe this will
   make maintenance easier in the long run, as it makes the breakdown of what
   relates to the host and what relates to the target a lot more explicit.
   Note that, for clarity's sake, and unlike the convention that was used
   previously, I chose to add an underscore between BIN and <ARCH>. This is
   because, once we start dealing with things like VS2017_BIN_ARM and
   VS2017_BIN_AARCH64, we'll probably be happier with a separator for <ARCH>.
3. Factorize the elements that are HOST related, since they don't need to be
   duplicated.

I'm hoping that these alterations can be agreed on. If that is the case, and
considering that these changes need to be applied on top of the current VS2017
proposal, I can submit a v2 of Liming's patches, that includes these changes,
for review and integration.

I should also point out that, outside of these modification, the current
proposal looks good to me especially as I have tested the generation of the
IA32 and X64 OVMF using VS2017 (from a regular command prompt rather than a
VS2017 one), as well as a handful of IA32 and X64 applications and found no
issues. For the sake of validating my proposed changes, I tested both the
x86 and x64 VS2017 HOSTs.

Regards,

/Pete

Pete Batard (1):
  BaseTools: Use VS2017 SDK path if defined and reorganize variables

 BaseTools/Conf/tools_def.template | 66 ++++++++++++++++++---------------------
 BaseTools/set_vsprefix_envs.bat   | 15 ++++-----
 2 files changed, 39 insertions(+), 42 deletions(-)

-- 
2.9.3.windows.2



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/1] BaseTools: Use VS2017 SDK path if defined and reorganize variables
  2017-11-16 13:21 [PATCH 0/1] Update for the 2017-10-18 VS2017 proposal Pete Batard
@ 2017-11-16 13:21 ` Pete Batard
  2017-11-16 14:48   ` Gao, Liming
  0 siblings, 1 reply; 4+ messages in thread
From: Pete Batard @ 2017-11-16 13:21 UTC (permalink / raw)
  To: edk2-devel; +Cc: liming.gao

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 _<ARCH>
   variables.
3. Factorize _DLL and _MAKE_PATH as these are host rather than arch
   dependent.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Pete Batard <pete@akeo.ie>
---
 BaseTools/Conf/tools_def.template | 66 ++++++++++++++++++---------------------
 BaseTools/set_vsprefix_envs.bat   | 15 ++++-----
 2 files changed, 39 insertions(+), 42 deletions(-)

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    = 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 VS2017_BIN         = ENV(VS2017_PREFIX)bin
+DEFINE VS2017_HOST        = x86
+DEFINE VS2017_BIN_HOST    = DEF(VS2017_BIN)\HostDEF(VS2017_HOST)\DEF(VS2017_HOST)
+DEFINE VS2017_BIN_IA32    = DEF(VS2017_BIN)\HostDEF(VS2017_HOST)\x86
+DEFINE VS2017_BIN_X64     = DEF(VS2017_BIN)\HostDEF(VS2017_HOST)\x64
 
 DEFINE WINSDK_BIN       = ENV(WINSDK_PREFIX)
 DEFINE WINSDKx86_BIN    = ENV(WINSDKx86_PREFIX)
@@ -98,7 +100,7 @@ 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)
+DEFINE WINSDK10_BIN       = ENV(WINSDK10_PREFIX)x86
 
 # These defines are needed for certain Microsoft Visual Studio tools that
 # are used by other toolchains.  An example is that ICC on Windows normally
@@ -4074,8 +4076,9 @@ NOOPT_VS2015x86xASL_X64_DLINK_FLAGS    = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT
 ####################################################################################
 #   VS2017           - Microsoft Visual Studio 2017 professional Edition with Intel ASL
 *_VS2017_*_*_FAMILY        = MSFT
+*_VS2017_*_*_DLL           = DEF(VS2017_BIN_HOST)
 
-*_VS2017_*_MAKE_PATH       = DEF(VS2017_BIN)\nmake.exe
+*_VS2017_*_MAKE_PATH       = DEF(VS2017_BIN_HOST)\nmake.exe
 *_VS2017_*_MAKE_FLAG       = /nologo
 *_VS2017_*_RC_PATH         = DEF(WINSDK10_BIN)\rc.exe
 
@@ -4085,7 +4088,7 @@ NOOPT_VS2015x86xASL_X64_DLINK_FLAGS    = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT
 *_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
+*_VS2017_*_ASM16_PATH      = DEF(VS2017_BIN_IA32)\ml.exe
 
 ##################
 # ASL definitions
@@ -4100,19 +4103,16 @@ NOOPT_VS2015x86xASL_X64_DLINK_FLAGS    = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT
 ##################
 # 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_CC_PATH      = DEF(VS2017_BIN_IA32)\cl.exe
+*_VS2017_IA32_VFRPP_PATH   = DEF(VS2017_BIN_IA32)\cl.exe
+*_VS2017_IA32_ASLCC_PATH   = DEF(VS2017_BIN_IA32)\cl.exe
+*_VS2017_IA32_ASLPP_PATH   = DEF(VS2017_BIN_IA32)\cl.exe
+*_VS2017_IA32_SLINK_PATH   = DEF(VS2017_BIN_IA32)\lib.exe
+*_VS2017_IA32_DLINK_PATH   = DEF(VS2017_BIN_IA32)\link.exe
+*_VS2017_IA32_ASLDLINK_PATH= DEF(VS2017_BIN_IA32)\link.exe
+*_VS2017_IA32_APP_PATH     = DEF(VS2017_BIN_IA32)\cl.exe
+*_VS2017_IA32_PP_PATH      = DEF(VS2017_BIN_IA32)\cl.exe
+*_VS2017_IA32_ASM_PATH     = DEF(VS2017_BIN_IA32)\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
@@ -4134,18 +4134,16 @@ NOOPT_VS2017_IA32_DLINK_FLAGS   = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /O
 ##################
 # 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
+*_VS2017_X64_CC_PATH       = DEF(VS2017_BIN_X64)\cl.exe
+*_VS2017_X64_PP_PATH       = DEF(VS2017_BIN_X64)\cl.exe
+*_VS2017_X64_APP_PATH      = DEF(VS2017_BIN_X64)\cl.exe
+*_VS2017_X64_VFRPP_PATH    = DEF(VS2017_BIN_X64)\cl.exe
+*_VS2017_X64_ASLCC_PATH    = DEF(VS2017_BIN_X64)\cl.exe
+*_VS2017_X64_ASLPP_PATH    = DEF(VS2017_BIN_X64)\cl.exe
+*_VS2017_X64_ASM_PATH      = DEF(VS2017_BIN_X64)\ml64.exe
+*_VS2017_X64_SLINK_PATH    = DEF(VS2017_BIN_X64)\lib.exe
+*_VS2017_X64_DLINK_PATH    = DEF(VS2017_BIN_X64)\link.exe
+*_VS2017_X64_ASLDLINK_PATH = DEF(VS2017_BIN_X64)\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
@@ -4167,14 +4165,12 @@ NOOPT_VS2017_X64_DLINK_FLAGS    = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /O
 # 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_SLINK_PATH          = DEF(VS2017_BIN_IA32)\link.exe
+*_VS2017_EBC_DLINK_PATH          = DEF(VS2017_BIN_IA32)\link.exe
 
 *_VS2017_EBC_MAKE_FLAGS          = /nologo
 *_VS2017_EBC_PP_FLAGS            = /nologo /E /TC /FIAutoGen.h
diff --git a/BaseTools/set_vsprefix_envs.bat b/BaseTools/set_vsprefix_envs.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 folder
 @REM   if the file is not executed within a WORKSPACE\BaseTools folder.
 @REM
-@REM Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
+@REM Copyright (c) 2016-2017, Intel Corporation. All rights reserved.<BR>
 @REM
 @REM This program and the accompanying materials are licensed and made available
 @REM under the terms and conditions of the BSD License which accompanies this
@@ -107,15 +107,16 @@ if not defined VS150COMNTOOLS (
 
 if defined VCToolsInstallDir (
   if not defined VS2017_PREFIX (
-    set "VS2017_PREFIX=%VCToolsInstallDir%bin\HostX86\x86"
-    set "VS2017X64_PREFIX=%VCToolsInstallDir%bin\HostX86\x64"
+    set "VS2017_PREFIX=%VCToolsInstallDir%"
   )
 )
 if not defined WINSDK10_PREFIX (
-  if exist "%ProgramFiles(x86)%\Windows Kits\10\bin\x86" (
-    set "WINSDK10_PREFIX=%ProgramFiles(x86)%\Windows Kits\10\bin\x86"
-  ) else if exist "%ProgramFiles%\Windows Kits\10\bin\x86" (
-    set "WINSDK10_PREFIX=%ProgramFiles%\Windows Kits\10\bin\x86"
+  if defined WindowsSdkVerBinPath (
+    set "WINSDK10_PREFIX=%WindowsSdkVerBinPath%"
+  ) else if exist "%ProgramFiles(x86)%\Windows Kits\10\bin" (
+    set "WINSDK10_PREFIX=%ProgramFiles(x86)%\Windows Kits\10\bin"
+  ) else if exist "%ProgramFiles%\Windows Kits\10\bin" (
+    set "WINSDK10_PREFIX=%ProgramFiles%\Windows Kits\10\bin"
   )
 )
 
-- 
2.9.3.windows.2



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] BaseTools: Use VS2017 SDK path if defined and reorganize variables
  2017-11-16 13:21 ` [PATCH 1/1] BaseTools: Use VS2017 SDK path if defined and reorganize variables Pete Batard
@ 2017-11-16 14:48   ` Gao, Liming
  2017-11-16 15:45     ` Pete Batard
  0 siblings, 1 reply; 4+ messages in thread
From: Gao, Liming @ 2017-11-16 14:48 UTC (permalink / raw)
  To: Pete Batard, edk2-devel@lists.01.org

I agree to separate HOST and ARCH. For this patch, I have minor comment on WINSDK10_BIN. 

DEFINE WINSDK10_BIN       = ENV(WINSDK10_PREFIX)x86
==>
DEFINE WINSDK10_BIN       = ENV(WINSDK10_PREFIX)DEF(VS2017_HOST)

Thanks
Liming
> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Pete Batard
> Sent: Thursday, November 16, 2017 9:21 PM
> To: edk2-devel@lists.01.org
> Cc: Gao, Liming <liming.gao@intel.com>
> Subject: [edk2] [PATCH 1/1] BaseTools: Use VS2017 SDK path if defined and reorganize variables
> 
> 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 _<ARCH>
>    variables.
> 3. Factorize _DLL and _MAKE_PATH as these are host rather than arch
>    dependent.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Pete Batard <pete@akeo.ie>
> ---
>  BaseTools/Conf/tools_def.template | 66 ++++++++++++++++++---------------------
>  BaseTools/set_vsprefix_envs.bat   | 15 ++++-----
>  2 files changed, 39 insertions(+), 42 deletions(-)
> 
> 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    = 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 VS2017_BIN         = ENV(VS2017_PREFIX)bin
> +DEFINE VS2017_HOST        = x86
> +DEFINE VS2017_BIN_HOST    = DEF(VS2017_BIN)\HostDEF(VS2017_HOST)\DEF(VS2017_HOST)
> +DEFINE VS2017_BIN_IA32    = DEF(VS2017_BIN)\HostDEF(VS2017_HOST)\x86
> +DEFINE VS2017_BIN_X64     = DEF(VS2017_BIN)\HostDEF(VS2017_HOST)\x64
> 
>  DEFINE WINSDK_BIN       = ENV(WINSDK_PREFIX)
>  DEFINE WINSDKx86_BIN    = ENV(WINSDKx86_PREFIX)
> @@ -98,7 +100,7 @@ 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)
> +DEFINE WINSDK10_BIN       = ENV(WINSDK10_PREFIX)x86
> 
>  # These defines are needed for certain Microsoft Visual Studio tools that
>  # are used by other toolchains.  An example is that ICC on Windows normally
> @@ -4074,8 +4076,9 @@ NOOPT_VS2015x86xASL_X64_DLINK_FLAGS    = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT
>  ####################################################################################
>  #   VS2017           - Microsoft Visual Studio 2017 professional Edition with Intel ASL
>  *_VS2017_*_*_FAMILY        = MSFT
> +*_VS2017_*_*_DLL           = DEF(VS2017_BIN_HOST)
> 
> -*_VS2017_*_MAKE_PATH       = DEF(VS2017_BIN)\nmake.exe
> +*_VS2017_*_MAKE_PATH       = DEF(VS2017_BIN_HOST)\nmake.exe
>  *_VS2017_*_MAKE_FLAG       = /nologo
>  *_VS2017_*_RC_PATH         = DEF(WINSDK10_BIN)\rc.exe
> 
> @@ -4085,7 +4088,7 @@ NOOPT_VS2015x86xASL_X64_DLINK_FLAGS    = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT
>  *_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
> +*_VS2017_*_ASM16_PATH      = DEF(VS2017_BIN_IA32)\ml.exe
> 
>  ##################
>  # ASL definitions
> @@ -4100,19 +4103,16 @@ NOOPT_VS2015x86xASL_X64_DLINK_FLAGS    = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT
>  ##################
>  # 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_CC_PATH      = DEF(VS2017_BIN_IA32)\cl.exe
> +*_VS2017_IA32_VFRPP_PATH   = DEF(VS2017_BIN_IA32)\cl.exe
> +*_VS2017_IA32_ASLCC_PATH   = DEF(VS2017_BIN_IA32)\cl.exe
> +*_VS2017_IA32_ASLPP_PATH   = DEF(VS2017_BIN_IA32)\cl.exe
> +*_VS2017_IA32_SLINK_PATH   = DEF(VS2017_BIN_IA32)\lib.exe
> +*_VS2017_IA32_DLINK_PATH   = DEF(VS2017_BIN_IA32)\link.exe
> +*_VS2017_IA32_ASLDLINK_PATH= DEF(VS2017_BIN_IA32)\link.exe
> +*_VS2017_IA32_APP_PATH     = DEF(VS2017_BIN_IA32)\cl.exe
> +*_VS2017_IA32_PP_PATH      = DEF(VS2017_BIN_IA32)\cl.exe
> +*_VS2017_IA32_ASM_PATH     = DEF(VS2017_BIN_IA32)\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
> @@ -4134,18 +4134,16 @@ NOOPT_VS2017_IA32_DLINK_FLAGS   = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /O
>  ##################
>  # 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
> +*_VS2017_X64_CC_PATH       = DEF(VS2017_BIN_X64)\cl.exe
> +*_VS2017_X64_PP_PATH       = DEF(VS2017_BIN_X64)\cl.exe
> +*_VS2017_X64_APP_PATH      = DEF(VS2017_BIN_X64)\cl.exe
> +*_VS2017_X64_VFRPP_PATH    = DEF(VS2017_BIN_X64)\cl.exe
> +*_VS2017_X64_ASLCC_PATH    = DEF(VS2017_BIN_X64)\cl.exe
> +*_VS2017_X64_ASLPP_PATH    = DEF(VS2017_BIN_X64)\cl.exe
> +*_VS2017_X64_ASM_PATH      = DEF(VS2017_BIN_X64)\ml64.exe
> +*_VS2017_X64_SLINK_PATH    = DEF(VS2017_BIN_X64)\lib.exe
> +*_VS2017_X64_DLINK_PATH    = DEF(VS2017_BIN_X64)\link.exe
> +*_VS2017_X64_ASLDLINK_PATH = DEF(VS2017_BIN_X64)\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
> @@ -4167,14 +4165,12 @@ NOOPT_VS2017_X64_DLINK_FLAGS    = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /O
>  # 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_SLINK_PATH          = DEF(VS2017_BIN_IA32)\link.exe
> +*_VS2017_EBC_DLINK_PATH          = DEF(VS2017_BIN_IA32)\link.exe
> 
>  *_VS2017_EBC_MAKE_FLAGS          = /nologo
>  *_VS2017_EBC_PP_FLAGS            = /nologo /E /TC /FIAutoGen.h
> diff --git a/BaseTools/set_vsprefix_envs.bat b/BaseTools/set_vsprefix_envs.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 folder
>  @REM   if the file is not executed within a WORKSPACE\BaseTools folder.
>  @REM
> -@REM Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
> +@REM Copyright (c) 2016-2017, Intel Corporation. All rights reserved.<BR>
>  @REM
>  @REM This program and the accompanying materials are licensed and made available
>  @REM under the terms and conditions of the BSD License which accompanies this
> @@ -107,15 +107,16 @@ if not defined VS150COMNTOOLS (
> 
>  if defined VCToolsInstallDir (
>    if not defined VS2017_PREFIX (
> -    set "VS2017_PREFIX=%VCToolsInstallDir%bin\HostX86\x86"
> -    set "VS2017X64_PREFIX=%VCToolsInstallDir%bin\HostX86\x64"
> +    set "VS2017_PREFIX=%VCToolsInstallDir%"
>    )
>  )
>  if not defined WINSDK10_PREFIX (
> -  if exist "%ProgramFiles(x86)%\Windows Kits\10\bin\x86" (
> -    set "WINSDK10_PREFIX=%ProgramFiles(x86)%\Windows Kits\10\bin\x86"
> -  ) else if exist "%ProgramFiles%\Windows Kits\10\bin\x86" (
> -    set "WINSDK10_PREFIX=%ProgramFiles%\Windows Kits\10\bin\x86"
> +  if defined WindowsSdkVerBinPath (
> +    set "WINSDK10_PREFIX=%WindowsSdkVerBinPath%"
> +  ) else if exist "%ProgramFiles(x86)%\Windows Kits\10\bin" (
> +    set "WINSDK10_PREFIX=%ProgramFiles(x86)%\Windows Kits\10\bin"
> +  ) else if exist "%ProgramFiles%\Windows Kits\10\bin" (
> +    set "WINSDK10_PREFIX=%ProgramFiles%\Windows Kits\10\bin"
>    )
>  )
> 
> --
> 2.9.3.windows.2
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] BaseTools: Use VS2017 SDK path if defined and reorganize variables
  2017-11-16 14:48   ` Gao, Liming
@ 2017-11-16 15:45     ` Pete Batard
  0 siblings, 0 replies; 4+ messages in thread
From: Pete Batard @ 2017-11-16 15:45 UTC (permalink / raw)
  To: Gao, Liming, edk2-devel@lists.01.org

On 2017.11.16 14:48, Gao, Liming wrote:
> I agree to separate HOST and ARCH. For this patch, I have minor comment on WINSDK10_BIN.
> 
> DEFINE WINSDK10_BIN       = ENV(WINSDK10_PREFIX)x86
> ==>
> DEFINE WINSDK10_BIN       = ENV(WINSDK10_PREFIX)DEF(VS2017_HOST)

Good point. I agree that the SDK should use the VS2017_HOST definition too.

If that's okay with you, I'm going to wait 24 hours to give a chance for 
people to comment, and then resubmit a v2 of your VS2017 patch series, 
that includes my proposed modifications as well as the change above.

Regards,

/Pete


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-11-16 15:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-16 13:21 [PATCH 0/1] Update for the 2017-10-18 VS2017 proposal Pete Batard
2017-11-16 13:21 ` [PATCH 1/1] BaseTools: Use VS2017 SDK path if defined and reorganize variables Pete Batard
2017-11-16 14:48   ` Gao, Liming
2017-11-16 15:45     ` Pete Batard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox