From nobody Tue Nov 26 19:49:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+47332+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+47332+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1568690250; cv=none; d=zoho.com; s=zohoarc; b=mFIstwK3q4lZT0YBL96XGCjiCmpbNT2Y+R2NTphOOTkSGL1OKswTHXRaytk2bvuVx4Uty3/dl+m99qjFwGTUP0H/xrR/PLib/883Pp//t1THEsDqBzDo4tiYrpJjQXnWSBomtSDzT2XOHiZocj7kV043RfH5K5AJQvwgdYWFStk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568690250; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=ft+Y5Kplta/n8tMrRYj9q1qpHgmRl/kQsfaJntvjH88=; b=AykjmPsQoaJ6370DLJ9eoZ+7xkviTX9uDyiCBDB3wcenOaLHhQzaVZ/HygfMzJvUZDl/2FbvozoAyBgHowwaSJWSD5ktexmzg1Qgx5T/v5EHpnQZK7qo885Xhkq/5pyMKhm/A4unWFk3QH1xEFR9gzWwlZvCWPioK1susgeJQ8M= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+47332+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 156869025087629.425608101378998; Mon, 16 Sep 2019 20:17:30 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id TSq9YY1788612x3O6YBIfYyf; Mon, 16 Sep 2019 20:17:29 -0700 X-Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by groups.io with SMTP; Mon, 16 Sep 2019 20:17:29 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Sep 2019 20:17:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,515,1559545200"; d="scan'208";a="180636831" X-Received: from chingjex-mobl.gar.corp.intel.com ([10.5.246.26]) by orsmga008.jf.intel.com with ESMTP; 16 Sep 2019 20:17:27 -0700 From: "Cheng, Ching JenX" To: devel@edk2.groups.io Cc: Amy Chan , Bob Feng , Liming Gao Subject: [edk2-devel] [PATCH v2 1/2] Add VS2019 Toolchain def Date: Tue, 17 Sep 2019 11:16:26 +0800 Message-Id: <20190917031627.4304-2-ching.jenx.cheng@intel.com> In-Reply-To: <20190917031627.4304-1-ching.jenx.cheng@intel.com> References: <20190917031627.4304-1-ching.jenx.cheng@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,ching.jenx.cheng@intel.com X-Gm-Message-State: ZIcQWKIvInO4IEvAWh1kp3TIx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1568690249; bh=E1yoFBybg7vug3neqlkr46OkRtuI8cecjXariZTAhog=; h=Cc:Date:From:Reply-To:Subject:To; b=YlTRmbMdzTWNBBsX2AlQIIp6P+BTpZj8q9GN9BXly1uIhC3w3j0hg0LQRLxKaAS68SZ z1KzF8H7dYmZ5bYJ4+BOmrfuzti9rdAP42rG+kSCjL9/eNpw2ZicMZpvLv25Q7lf6hHXO eiOPRR+hI7d6WI6CV8Jndqbg5OugMdBAzaE= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2182 In order to support VS2019, the first thing need to do is add 2019 toolchain on tools_def.template v2: add ARM/AARCH64/EBC Definitions, Combine VS2017_HOST and VS2019_HOST to= VS_HOST Cc: Amy Chan Cc: Bob Feng Cc: Liming Gao Signed-off-by: Ching JenX Cheng Reviewed-by: Pete Batard --- BaseTools/Conf/tools_def.template | 220 ++++++++++++++++++++++++++++++++++= +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++= +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++= +++++++++++++++++------------------- 1 file changed, 201 insertions(+), 19 deletions(-) diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.t= emplate index 8f0e6cb6c2..88a6764f43 100755 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -55,35 +55,43 @@ DEFINE VS2015x86_BIN =3D ENV(VS2015_PREFIX)Vc\bin DEFINE VS2015x86_DLL =3D ENV(VS2015_PREFIX)Common7\IDE;DEF(VS2015x86_BI= N) 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(VS2= 017_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 VS2017_BIN_ARM =3D DEF(VS2017_BIN)\HostDEF(VS2017_HOST)\arm -DEFINE VS2017_BIN_AARCH64 =3D DEF(VS2017_BIN)\HostDEF(VS2017_HOST)\arm64 +DEFINE VS_HOST =3D x86 -DEFINE WINSDK_BIN =3D ENV(WINSDK_PREFIX) -DEFINE WINSDKx86_BIN =3D ENV(WINSDKx86_PREFIX) +DEFINE VS2017_BIN =3D ENV(VS2017_PREFIX)bin +DEFINE VS2017_BIN_HOST =3D DEF(VS2017_BIN)\HostDEF(VS_HOST)\DEF(VS_HOST) +DEFINE VS2017_BIN_IA32 =3D DEF(VS2017_BIN)\HostDEF(VS_HOST)\x86 +DEFINE VS2017_BIN_X64 =3D DEF(VS2017_BIN)\HostDEF(VS_HOST)\x64 +DEFINE VS2017_BIN_ARM =3D DEF(VS2017_BIN)\HostDEF(VS_HOST)\arm +DEFINE VS2017_BIN_AARCH64 =3D DEF(VS2017_BIN)\HostDEF(VS_HOST)\arm64 + +DEFINE VS2019_BIN =3D ENV(VS2019_PREFIX)bin +DEFINE VS2019_BIN_HOST =3D DEF(VS2019_BIN)\HostDEF(VS_HOST)\DEF(VS_HOST) +DEFINE VS2019_BIN_IA32 =3D DEF(VS2019_BIN)\HostDEF(VS_HOST)\x86 +DEFINE VS2019_BIN_X64 =3D DEF(VS2019_BIN)\HostDEF(VS_HOST)\x64 +DEFINE VS2019_BIN_ARM =3D DEF(VS2019_BIN)\HostDEF(VS_HOST)\arm +DEFINE VS2019_BIN_AARCH64 =3D DEF(VS2019_BIN)\HostDEF(VS_HOST)\arm64 + +DEFINE WINSDK_BIN =3D ENV(WINSDK_PREFIX) +DEFINE WINSDKx86_BIN =3D ENV(WINSDKx86_PREFIX) # Microsoft Visual Studio 2010 -DEFINE WINSDK7_BIN =3D ENV(WINSDK7_PREFIX) -DEFINE WINSDK7x86_BIN =3D ENV(WINSDK7x86_PREFIX) +DEFINE WINSDK7_BIN =3D ENV(WINSDK7_PREFIX) +DEFINE WINSDK7x86_BIN =3D ENV(WINSDK7x86_PREFIX) # Microsoft Visual Studio 2012 Update 1 (required for rc.exe that was not = included in the initial release) -DEFINE WINSDK71_BIN =3D ENV(WINSDK71_PREFIX) -DEFINE WINSDK71x86_BIN =3D ENV(WINSDK71x86_PREFIX) +DEFINE WINSDK71_BIN =3D ENV(WINSDK71_PREFIX) +DEFINE WINSDK71x86_BIN =3D ENV(WINSDK71x86_PREFIX) # Microsoft Visual Studio 2013 Professional Edition -DEFINE WINSDK8_BIN =3D ENV(WINSDK8_PREFIX)x86\ -DEFINE WINSDK8x86_BIN =3D ENV(WINSDK8x86_PREFIX)x64 +DEFINE WINSDK8_BIN =3D ENV(WINSDK8_PREFIX)x86\ +DEFINE WINSDK8x86_BIN =3D ENV(WINSDK8x86_PREFIX)x64 # Microsoft Visual Studio 2015 Professional Edition -DEFINE WINSDK81_BIN =3D ENV(WINSDK81_PREFIX)x86\ -DEFINE WINSDK81x86_BIN =3D ENV(WINSDK81x86_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) +# Microsoft Visual Studio 2017/2019 Professional Edition +DEFINE WINSDK10_BIN =3D ENV(WINSDK10_PREFIX)DEF(VS_HOST) # These defines are needed for certain Microsoft Visual Studio tools that # are used by other toolchains. An example is that ICC on Windows normally @@ -218,6 +226,17 @@ DEFINE DTC_BIN =3D ENV(DTC_PREFIX)dtc # Note: # Building of XIP firmware images for ARM/ARM6= 4 is not currently supported (only applications). # /FILEALIGN:4096 and other changes are needed= for ARM firmware builds. +# VS2019 -win32- Requires: +# Microsoft Visual Studio 2019 version 16.2 or= later +# Optional: +# Required to build EBC drivers: +# Intel(r) Compiler for Efi Byte Code (Intel= (r) EBC Compiler) +# Required to build platforms or ACPI tables: +# Intel(r) ACPI Compiler (iasl.exe) from +# https://acpica.org/downloads +# Note: +# Building of XIP firmware images for ARM/ARM6= 4 is not currently supported (only applications). +# /FILEALIGN:4096 and other changes are needed= for ARM firmware builds. # GCC48 -Linux,Windows- Requires: # GCC 4.8 targeting x86_64-linux-gnu, aarch64-= linux-gnu, or arm-linux-gnueabi # Optional: @@ -1691,6 +1710,169 @@ NOOPT_VS2017_AARCH64_DLINK_FLAGS =3D /NOLOGO /NOD= EFAULTLIB /IGNORE:4001 /OPT:REF *_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_ENT= RY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP /ALIGN:32 /DRIVER +##########################################################################= ########## +# VS2019 - Microsoft Visual Studio 2019 with Intel ASL +# ASL - Intel ACPI Source Language Compiler (iasl.exe) +##########################################################################= ########## +# VS2019 - Microsoft Visual Studio 2017 professional Edition w= ith Intel ASL +*_VS2019_*_*_FAMILY =3D MSFT +*_VS2019_*_*_DLL =3D DEF(VS2019_BIN_HOST) + +*_VS2019_*_MAKE_PATH =3D DEF(VS2019_BIN_HOST)\nmake.exe +*_VS2019_*_MAKE_FLAG =3D /nologo +*_VS2019_*_RC_PATH =3D DEF(WINSDK10_BIN)\rc.exe + +*_VS2019_*_MAKE_FLAGS =3D /nologo +*_VS2019_*_SLINK_FLAGS =3D /NOLOGO /LTCG +*_VS2019_*_APP_FLAGS =3D /nologo /E /TC +*_VS2019_*_PP_FLAGS =3D /nologo /E /TC /FIAutoGen.h +*_VS2019_*_VFRPP_FLAGS =3D /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAM= E)StrDefs.h +*_VS2019_*_DLINK2_FLAGS =3D /WHOLEARCHIVE +*_VS2019_*_ASM16_PATH =3D DEF(VS2019_BIN_IA32)\ml.exe + +################## +# ASL definitions +################## +*_VS2019_*_ASL_PATH =3D DEF(WIN_IASL_BIN) +*_VS2019_*_ASL_FLAGS =3D DEF(DEFAULT_WIN_ASL_FLAGS) +*_VS2019_*_ASL_OUTFLAGS =3D DEF(DEFAULT_WIN_ASL_OUTFLAGS) +*_VS2019_*_ASLCC_FLAGS =3D DEF(MSFT_ASLCC_FLAGS) +*_VS2019_*_ASLPP_FLAGS =3D DEF(MSFT_ASLPP_FLAGS) +*_VS2019_*_ASLDLINK_FLAGS =3D DEF(MSFT_ASLDLINK_FLAGS) + +################## +# IA32 definitions +################## +*_VS2019_IA32_CC_PATH =3D DEF(VS2019_BIN_IA32)\cl.exe +*_VS2019_IA32_VFRPP_PATH =3D DEF(VS2019_BIN_IA32)\cl.exe +*_VS2019_IA32_ASLCC_PATH =3D DEF(VS2019_BIN_IA32)\cl.exe +*_VS2019_IA32_ASLPP_PATH =3D DEF(VS2019_BIN_IA32)\cl.exe +*_VS2019_IA32_SLINK_PATH =3D DEF(VS2019_BIN_IA32)\lib.exe +*_VS2019_IA32_DLINK_PATH =3D DEF(VS2019_BIN_IA32)\link.exe +*_VS2019_IA32_ASLDLINK_PATH=3D DEF(VS2019_BIN_IA32)\link.exe +*_VS2019_IA32_APP_PATH =3D DEF(VS2019_BIN_IA32)\cl.exe +*_VS2019_IA32_PP_PATH =3D DEF(VS2019_BIN_IA32)\cl.exe +*_VS2019_IA32_ASM_PATH =3D DEF(VS2019_BIN_IA32)\ml.exe + + *_VS2019_IA32_MAKE_FLAGS =3D /nologo + DEBUG_VS2019_IA32_CC_FLAGS =3D /nologo /arch:IA32 /c /WX /GS- /W4 /Gs= 32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 /Gw /MP +RELEASE_VS2019_IA32_CC_FLAGS =3D /nologo /arch:IA32 /c /WX /GS- /W4 /Gs= 32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gw /MP +NOOPT_VS2019_IA32_CC_FLAGS =3D /nologo /arch:IA32 /c /WX /GS- /W4 /Gs= 32768 /D UNICODE /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 /Od /MP + + DEBUG_VS2019_IA32_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /coff /Zd /Zi +RELEASE_VS2019_IA32_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /coff /Zd +NOOPT_VS2019_IA32_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /coff /Zd /Zi + + DEBUG_VS2019_IA32_NASM_FLAGS =3D -Ox -f win32 -g +RELEASE_VS2019_IA32_NASM_FLAGS =3D -Ox -f win32 +NOOPT_VS2019_IA32_NASM_FLAGS =3D -O0 -f win32 -g + + DEBUG_VS2019_IA32_DLINK_FLAGS =3D /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OP= T:REF /OPT:ICF=3D10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MAC= HINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE= _DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG +RELEASE_VS2019_IA32_DLINK_FLAGS =3D /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IG= NORE: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_VS2019_IA32_DLINK_FLAGS =3D /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OP= T:REF /OPT:ICF=3D10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MAC= HINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE= _DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG + +################## +# X64 definitions +################## +*_VS2019_X64_CC_PATH =3D DEF(VS2019_BIN_X64)\cl.exe +*_VS2019_X64_PP_PATH =3D DEF(VS2019_BIN_X64)\cl.exe +*_VS2019_X64_APP_PATH =3D DEF(VS2019_BIN_X64)\cl.exe +*_VS2019_X64_VFRPP_PATH =3D DEF(VS2019_BIN_X64)\cl.exe +*_VS2019_X64_ASLCC_PATH =3D DEF(VS2019_BIN_X64)\cl.exe +*_VS2019_X64_ASLPP_PATH =3D DEF(VS2019_BIN_X64)\cl.exe +*_VS2019_X64_ASM_PATH =3D DEF(VS2019_BIN_X64)\ml64.exe +*_VS2019_X64_SLINK_PATH =3D DEF(VS2019_BIN_X64)\lib.exe +*_VS2019_X64_DLINK_PATH =3D DEF(VS2019_BIN_X64)\link.exe +*_VS2019_X64_ASLDLINK_PATH =3D DEF(VS2019_BIN_X64)\link.exe + + DEBUG_VS2019_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D UN= ICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /Gw /MP +RELEASE_VS2019_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D UN= ICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Gw /MP +NOOPT_VS2019_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D UN= ICODE /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /Od /MP + + DEBUG_VS2019_X64_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /Zd /Zi +RELEASE_VS2019_X64_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /Zd +NOOPT_VS2019_X64_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /Zd /Zi + + DEBUG_VS2019_X64_NASM_FLAGS =3D -Ox -f win64 -g +RELEASE_VS2019_X64_NASM_FLAGS =3D -Ox -f win64 +NOOPT_VS2019_X64_NASM_FLAGS =3D -O0 -f win64 -g + + DEBUG_VS2019_X64_DLINK_FLAGS =3D /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IG= NORE:4281 /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_VS2019_X64_DLINK_FLAGS =3D /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IG= NORE:4281 /IGNORE:4254 /OPT:REF /OPT:ICF=3D10 /MAP /ALIGN:32 /SECTION:.xdat= a,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_VS2019_X64_DLINK_FLAGS =3D /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IG= NORE:4281 /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 + +################# +# ARM definitions +################# +*_VS2019_ARM_CC_PATH =3D DEF(VS2019_BIN_ARM)\cl.exe +*_VS2019_ARM_VFRPP_PATH =3D DEF(VS2019_BIN_ARM)\cl.exe +*_VS2019_ARM_SLINK_PATH =3D DEF(VS2019_BIN_ARM)\lib.exe +*_VS2019_ARM_DLINK_PATH =3D DEF(VS2019_BIN_ARM)\link.exe +*_VS2019_ARM_APP_PATH =3D DEF(VS2019_BIN_ARM)\cl.exe +*_VS2019_ARM_PP_PATH =3D DEF(VS2019_BIN_ARM)\cl.exe +*_VS2019_ARM_ASM_PATH =3D DEF(VS2019_BIN_ARM)\armasm.exe +*_VS2019_ARM_ASLCC_PATH =3D DEF(VS2019_BIN_ARM)\cl.exe +*_VS2019_ARM_ASLPP_PATH =3D DEF(VS2019_BIN_ARM)\cl.exe +*_VS2019_ARM_ASLDLINK_PATH =3D DEF(VS2019_BIN_ARM)\link.exe + + *_VS2019_ARM_MAKE_FLAGS =3D /nologo + DEBUG_VS2019_ARM_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D = UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm /Gw /Oi- +RELEASE_VS2019_ARM_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D = UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gw /Oi- +NOOPT_VS2019_ARM_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D = UNICODE /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm /Od /Oi- + + DEBUG_VS2019_ARM_ASM_FLAGS =3D /nologo /g +RELEASE_VS2019_ARM_ASM_FLAGS =3D /nologo +NOOPT_VS2019_ARM_ASM_FLAGS =3D /nologo + + DEBUG_VS2019_ARM_DLINK_FLAGS =3D /NOLOGO /NODEFAULTLIB /IGNORE:4001 /= OPT:REF /OPT:ICF=3D10 /MAP /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:ARM= /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER = /SAFESEH:NO /BASE:0 /DRIVER /DEBUG +RELEASE_VS2019_ARM_DLINK_FLAGS =3D /NOLOGO /NODEFAULTLIB /IGNORE:4001 /= IGNORE:4254 /OPT:REF /OPT:ICF=3D10 /MAP /SECTION:.xdata,D /SECTION:.pdata,D= /MACHINE:ARM /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SE= RVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=3D.data +NOOPT_VS2019_ARM_DLINK_FLAGS =3D /NOLOGO /NODEFAULTLIB /IGNORE:4001 /= OPT:REF /OPT:ICF=3D10 /MAP /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:ARM= /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER = /SAFESEH:NO /BASE:0 /DRIVER /DEBUG + +##################### +# AARCH64 definitions +##################### +*_VS2019_AARCH64_CC_PATH =3D DEF(VS2019_BIN_AARCH64)\cl.exe +*_VS2019_AARCH64_VFRPP_PATH =3D DEF(VS2019_BIN_AARCH64)\cl.exe +*_VS2019_AARCH64_SLINK_PATH =3D DEF(VS2019_BIN_AARCH64)\lib.exe +*_VS2019_AARCH64_DLINK_PATH =3D DEF(VS2019_BIN_AARCH64)\link.exe +*_VS2019_AARCH64_APP_PATH =3D DEF(VS2019_BIN_AARCH64)\cl.exe +*_VS2019_AARCH64_PP_PATH =3D DEF(VS2019_BIN_AARCH64)\cl.exe +*_VS2019_AARCH64_ASM_PATH =3D DEF(VS2019_BIN_AARCH64)\armasm64.exe +*_VS2019_AARCH64_ASLCC_PATH =3D DEF(VS2019_BIN_AARCH64)\cl.exe +*_VS2019_AARCH64_ASLPP_PATH =3D DEF(VS2019_BIN_AARCH64)\cl.exe +*_VS2019_AARCH64_ASLDLINK_PATH =3D DEF(VS2019_BIN_AARCH64)\link.exe + + *_VS2019_AARCH64_MAKE_FLAGS =3D /nologo + DEBUG_VS2019_AARCH64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D= UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm /Gw /Oi- +RELEASE_VS2019_AARCH64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D= UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gw /Oi- +NOOPT_VS2019_AARCH64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D= UNICODE /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm /Od /Oi- + + DEBUG_VS2019_AARCH64_ASM_FLAGS =3D /nologo /g +RELEASE_VS2019_AARCH64_ASM_FLAGS =3D /nologo +NOOPT_VS2019_AARCH64_ASM_FLAGS =3D /nologo + + DEBUG_VS2019_AARCH64_DLINK_FLAGS =3D /NOLOGO /NODEFAULTLIB /IGNORE:4001 = /OPT:REF /OPT:ICF=3D10 /MAP /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:AR= M64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIV= ER /SAFESEH:NO /DRIVER /DEBUG +RELEASE_VS2019_AARCH64_DLINK_FLAGS =3D /NOLOGO /NODEFAULTLIB /IGNORE:4001 = /IGNORE:4254 /OPT:REF /OPT:ICF=3D10 /MAP /SECTION:.xdata,D /SECTION:.pdata,= D /MACHINE:ARM64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT= _SERVICE_DRIVER /SAFESEH:NO /DRIVER /MERGE:.rdata=3D.data +NOOPT_VS2019_AARCH64_DLINK_FLAGS =3D /NOLOGO /NODEFAULTLIB /IGNORE:4001 = /OPT:REF /OPT:ICF=3D10 /MAP /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:AR= M64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIV= ER /SAFESEH:NO /DRIVER /DEBUG + +################## +# EBC definitions +################## +*_VS2019_EBC_*_FAMILY =3D INTEL + +*_VS2019_EBC_PP_PATH =3D DEF(EBC_BINx86)\iec.exe +*_VS2019_EBC_VFRPP_PATH =3D DEF(EBC_BINx86)\iec.exe +*_VS2019_EBC_CC_PATH =3D DEF(EBC_BINx86)\iec.exe +*_VS2019_EBC_SLINK_PATH =3D DEF(VS2019_BIN_IA32)\link.exe +*_VS2019_EBC_DLINK_PATH =3D DEF(VS2019_BIN_IA32)\link.exe + +*_VS2019_EBC_MAKE_FLAGS =3D /nologo +*_VS2019_EBC_PP_FLAGS =3D /nologo /E /TC /FIAutoGen.h +*_VS2019_EBC_CC_FLAGS =3D /nologo /c /WX /W3 /FIAutoGen.h /D$(M= ODULE_ENTRY_POINT)=3D$(ARCH_ENTRY_POINT) +*_VS2019_EBC_VFRPP_FLAGS =3D /nologo /E /TC /DVFRCOMPILE /FI$(MODU= LE_NAME)StrDefs.h +*_VS2019_EBC_SLINK_FLAGS =3D /lib /NOLOGO /MACHINE:EBC +*_VS2019_EBC_DLINK_FLAGS =3D "C:\Program Files (x86)\Intel\EBC\Lib= \EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC /OPT:REF /ENTRY:$(IMAGE_ENT= RY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP /ALIGN:32 /DRIVER + ##########################################################################= ########## # GCC Common ##########################################################################= ########## -- 2.21.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#47332): https://edk2.groups.io/g/devel/message/47332 Mute This Topic: https://groups.io/mt/34172664/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Tue Nov 26 19:49:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+47334+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+47334+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1568690258; cv=none; d=zoho.com; s=zohoarc; b=BZaO2THTpDnICrn0+36bUoQwwWe+PHDkllD9149g6Lff3rLdaNLHJgRYJQbrU9SvUUd3o9NxzbU6t0EIa7lecseoGpoUaDrQKAGuNKAKCmNhKhDgyWpfl2Ao1ggKDvI5X3iB6EoABdGkUAt+ufd7/Dat1KvCqnjoqLILhtM7BfQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568690258; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=rr5+jhjygNpIUwZFRhvrUKQ8tlWjwBbydr9m8vi7+uY=; b=CLgu3XMlBs5HkajIdBDU1YTrlUboRVsNXJ8DhpJ3H+2tzLd5LmXkomVLMfLvI0ZuiU4ATzzpzn8B/MrYKUSezhrgL8xLZard03gy5pZcnOFKQnjDpDxFEjDa03x0JlvESW8OJEZF2A9f+gssQardubAqqnQ/+r6f60CcAKSRLro= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+47334+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1568690258701734.6377254878545; Mon, 16 Sep 2019 20:17:38 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id LxPWYY1788612xtgGO3lXAZv; Mon, 16 Sep 2019 20:17:37 -0700 X-Received: from mga17.intel.com (mga17.intel.com []) by groups.io with SMTP; Mon, 16 Sep 2019 20:17:32 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Sep 2019 20:17:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,515,1559545200"; d="scan'208";a="180636849" X-Received: from chingjex-mobl.gar.corp.intel.com ([10.5.246.26]) by orsmga008.jf.intel.com with ESMTP; 16 Sep 2019 20:17:30 -0700 From: "Cheng, Ching JenX" To: devel@edk2.groups.io Cc: Amy Chan , Bob Feng , Liming Gao Subject: [edk2-devel] [PATCH v2 2/2] Add VS2019 Support on ToolSetup Batches Date: Tue, 17 Sep 2019 11:16:27 +0800 Message-Id: <20190917031627.4304-3-ching.jenx.cheng@intel.com> In-Reply-To: <20190917031627.4304-1-ching.jenx.cheng@intel.com> References: <20190917031627.4304-1-ching.jenx.cheng@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,ching.jenx.cheng@intel.com X-Gm-Message-State: NBYRQFryQPa0p5EYeweNBJf5x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1568690257; bh=c4AxH4WHuX6/bOJ+hgcBemV6PSERRAeSFC/5B0A46xw=; h=Cc:Date:From:Reply-To:Subject:To; b=R0y0ueFE+bRpVsiGx5Z3lzrUsNAoNDzWgvZrDsb6e5NRQDZK0Q6+0gef9rLK+tALtL+ GwT4ra8qkMpOtcFHsHR40lhJejrgFwj+Bis68cqnIm5V+VCSJjG1QOb5I+ucqe31dvqB1 JPMBIXDzzpP73y4Qvq7DBMUjWU3gt37t+tM= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2182 Inorder to support VS2019, we add VS2019 config process in Setup Batch Files, Because VS2019 and VS2017 could using same vswhere.exe to detect the InstallationPath, So we add the -version as the parameter of vswhere to get the correct VS2017/VS2019's InstallationPath Cc: Amy Chan Cc: Bob Feng Cc: Liming Gao Signed-off-by: Ching JenX Cheng --- BaseTools/get_vsvars.bat | 37 ++++++++++++++++++++++++++++++------- BaseTools/set_vsprefix_envs.bat | 70 +++++++++++++++++++++++++++++++++++++= ++++++++++++++++++++++++++++----- BaseTools/toolsetup.bat | 16 +++++++++++++--- edksetup.bat | 6 ++++-- 4 files changed, 112 insertions(+), 17 deletions(-) diff --git a/BaseTools/get_vsvars.bat b/BaseTools/get_vsvars.bat index 9f3759b2a9..3beb113be2 100644 --- a/BaseTools/get_vsvars.bat +++ b/BaseTools/get_vsvars.bat @@ -10,15 +10,21 @@ @echo off set SCRIPT_ERROR=3D0 if "%1"=3D=3D"" goto main +if /I "%1"=3D=3D"VS2019" goto VS2019Vars if /I "%1"=3D=3D"VS2017" goto VS2017Vars if /I "%1"=3D=3D"VS2015" goto VS2015Vars if /I "%1"=3D=3D"VS2013" goto VS2013Vars if /I "%1"=3D=3D"VS2012" goto VS2012Vars :set_vsvars -for /f "usebackq tokens=3D1* delims=3D: " %%i in (`%*`) do ( - if /i "%%i"=3D=3D"installationPath" call "%%j\VC\Auxiliary\Build\vcvars3= 2.bat" -) +if defined VCINSTALLDIR goto :EOF + call %* > vswhereInfo + for /f "usebackq tokens=3D1* delims=3D: " %%i in (vswhereInfo) do ( + if /i "%%i"=3D=3D"installationPath" ( + call "%%j\VC\Auxiliary\Build\vcvars32.bat" + ) + ) + del vswhereInfo goto :EOF :read_vsvars @@ -42,19 +48,36 @@ REM (Or invoke the relevant vsvars32 file beforeh= and). :main if defined VCINSTALLDIR goto :done + :VS2019Vars + if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.= exe" ( + if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\BuildTools"= ( + call :set_vsvars "%ProgramFiles(x86)%\Microsoft Visual Studio\Instal= ler\vswhere.exe" -products Microsoft.VisualStudio.Product.BuildTools -versi= on 16,17 + ) else ( + call :set_vsvars "%ProgramFiles(x86)%\Microsoft Visual Studio\Instal= ler\vswhere.exe" -version 16,17 + ) + ) + if exist "%ProgramFiles%\Microsoft Visual Studio\Installer\vswhere.exe" ( + if exist "%ProgramFiles%\Microsoft Visual Studio\2019\BuildTools" ( + call :set_vsvars "%ProgramFiles%\Microsoft Visual Studio\Installer\v= swhere.exe" -products Microsoft.VisualStudio.Product.BuildTools -version 16= ,17 + ) else ( + call :set_vsvars "%ProgramFiles%\Microsoft Visual Studio\Installer\v= swhere.exe" -version 16,17 + ) + ) + if /I "%1"=3D=3D"VS2019" goto ToolNotInstall + :VS2017Vars if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.= exe" ( if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\BuildTools"= ( - call :set_vsvars "%ProgramFiles(x86)%\Microsoft Visual Studio\Instal= ler\vswhere.exe" -products Microsoft.VisualStudio.Product.BuildTools + call :set_vsvars "%ProgramFiles(x86)%\Microsoft Visual Studio\Instal= ler\vswhere.exe" -products Microsoft.VisualStudio.Product.BuildTools -versi= on 15,16 ) else ( - call :set_vsvars "%ProgramFiles(x86)%\Microsoft Visual Studio\Instal= ler\vswhere.exe" + call :set_vsvars "%ProgramFiles(x86)%\Microsoft Visual Studio\Instal= ler\vswhere.exe" -version 15,16 ) ) if exist "%ProgramFiles%\Microsoft Visual Studio\Installer\vswhere.exe" ( if exist "%ProgramFiles%\Microsoft Visual Studio\2017\BuildTools" ( - call :set_vsvars "%ProgramFiles%\Microsoft Visual Studio\Installer\v= swhere.exe" -products Microsoft.VisualStudio.Product.BuildTools + call :set_vsvars "%ProgramFiles%\Microsoft Visual Studio\Installer\v= swhere.exe" -products Microsoft.VisualStudio.Product.BuildTools -version 15= ,16 ) else ( - call :set_vsvars "%ProgramFiles%\Microsoft Visual Studio\Installer\v= swhere.exe" + call :set_vsvars "%ProgramFiles%\Microsoft Visual Studio\Installer\v= swhere.exe" -version 15,16 ) ) if /I "%1"=3D=3D"VS2017" goto ToolNotInstall diff --git a/BaseTools/set_vsprefix_envs.bat b/BaseTools/set_vsprefix_envs.= bat index 81686f5b63..46b84713a6 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 fold= er @REM if the file is not executed within a WORKSPACE\BaseTools folder. @REM -@REM Copyright (c) 2016-2017, Intel Corporation. All rights reserved.
+@REM Copyright (c) 2016-2019, Intel Corporation. All rights reserved.
@REM @REM SPDX-License-Identifier: BSD-2-Clause-Patent @REM @@ -18,6 +18,7 @@ set SCRIPT_ERROR=3D1 goto :EOF :main +if /I "%1"=3D=3D"VS2019" goto SetVS2019 if /I "%1"=3D=3D"VS2017" goto SetVS2017 if /I "%1"=3D=3D"VS2015" goto SetVS2015 if /I "%1"=3D=3D"VS2013" goto SetVS2013 @@ -107,27 +108,86 @@ if defined VS140COMNTOOLS ( ) if /I "%1"=3D=3D"VS2015" goto SetWinDDK +:SetVS2019 +if not defined VS160COMNTOOLS ( + if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.= exe" ( + if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\BuildTools"= ( + call "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.= exe" -products Microsoft.VisualStudio.Product.BuildTools -version 16,17 > v= swhereInfo + for /f "usebackq tokens=3D1* delims=3D: " %%i in (vswhereInfo) do ( + if /i "%%i"=3D=3D"installationPath" call "%%j\VC\Auxiliary\Build\v= cvars32.bat" + ) + del vswhereInfo + ) else ( + call "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.= exe" -version 16,17 > vswhereInfo + for /f "usebackq tokens=3D1* delims=3D: " %%i in (vswhereInfo) do ( + if /i "%%i"=3D=3D"installationPath" call "%%j\VC\Auxiliary\Build\v= cvars32.bat" + ) + del vswhereInfo + ) + ) else if exist "%ProgramFiles%\Microsoft Visual Studio\Installer\vswher= e.exe" ( + if exist "%ProgramFiles%\Microsoft Visual Studio\2019\BuildTools" ( + call "%ProgramFiles%\Microsoft Visual Studio\Installer\vswhere.exe" = -products Microsoft.VisualStudio.Product.BuildTools -version 16,17 > vswher= eInfo + for /f "usebackq tokens=3D1* delims=3D: " %%i in (vswhereInfo) do ( + if /i "%%i"=3D=3D"installationPath" call "%%j\VC\Auxiliary\Build\v= cvars32.bat" + ) + del vswhereInfo + ) else ( + call "%ProgramFiles%\Microsoft Visual Studio\Installer\vswhere.exe" = -version 16,17 > vswhereInfo + for /f "usebackq tokens=3D1* delims=3D: " %%i in (vswhereInfo) do ( + if /i "%%i"=3D=3D"installationPath" call "%%j\VC\Auxiliary\Build\v= cvars32.bat" + ) + del vswhereInfo + ) + ) else ( + if /I "%1"=3D=3D"VS2019" goto ToolNotInstall + goto SetWinDDK + ) +) + +if defined VCToolsInstallDir ( + if not defined VS2019_PREFIX ( + set "VS2019_PREFIX=3D%VCToolsInstallDir%" + ) +) +if not defined WINSDK10_PREFIX ( + 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\" + ) +) + :SetVS2017 if not defined VS150COMNTOOLS ( if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.= exe" ( if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\BuildTools"= ( - for /f "usebackq tokens=3D1* delims=3D: " %%i in (`"%ProgramFiles(x8= 6)%\Microsoft Visual Studio\Installer\vswhere.exe" -products Microsoft.Visu= alStudio.Product.BuildTools`) do ( + call "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.= exe" -products Microsoft.VisualStudio.Product.BuildTools -version 15,16 > v= swhereInfo + for /f "usebackq tokens=3D1* delims=3D: " %%i in (vswhereInfo) do ( if /i "%%i"=3D=3D"installationPath" call "%%j\VC\Auxiliary\Build\v= cvars32.bat" ) + del vswhereInfo ) else ( - for /f "usebackq tokens=3D1* delims=3D: " %%i in (`"%ProgramFiles(x8= 6)%\Microsoft Visual Studio\Installer\vswhere.exe"`) do ( + call "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.= exe" -version 15,16 > vswhereInfo + for /f "usebackq tokens=3D1* delims=3D: " %%i in (vswhereInfo) do ( if /i "%%i"=3D=3D"installationPath" call "%%j\VC\Auxiliary\Build\v= cvars32.bat" ) + del vswhereInfo ) ) else if exist "%ProgramFiles%\Microsoft Visual Studio\Installer\vswher= e.exe" ( if exist "%ProgramFiles%\Microsoft Visual Studio\2017\BuildTools" ( - for /f "usebackq tokens=3D1* delims=3D: " %%i in (`"%ProgramFiles%\M= icrosoft Visual Studio\Installer\vswhere.exe" -products Microsoft.VisualStu= dio.Product.BuildTools`) do ( + call "%ProgramFiles%\Microsoft Visual Studio\Installer\vswhere.exe" = -products Microsoft.VisualStudio.Product.BuildTools -version 15,16 > vswher= eInfo + for /f "usebackq tokens=3D1* delims=3D: " %%i in (vswhereInfo) do ( if /i "%%i"=3D=3D"installationPath" call "%%j\VC\Auxiliary\Build\v= cvars32.bat" ) + del vswhereInfo ) else ( - for /f "usebackq tokens=3D1* delims=3D: " %%i in (`"%ProgramFiles%\M= icrosoft Visual Studio\Installer\vswhere.exe"`) do ( + call "%ProgramFiles%\Microsoft Visual Studio\Installer\vswhere.exe" = -version 15,16 > vswhereInfo + for /f "usebackq tokens=3D1* delims=3D: " %%i in (vswhereInfo) do ( if /i "%%i"=3D=3D"installationPath" call "%%j\VC\Auxiliary\Build\v= cvars32.bat" ) + del vswhereInfo ) ) else ( if /I "%1"=3D=3D"VS2017" goto ToolNotInstall diff --git a/BaseTools/toolsetup.bat b/BaseTools/toolsetup.bat index 395694fa09..61ebf4ae09 100755 --- a/BaseTools/toolsetup.bat +++ b/BaseTools/toolsetup.bat @@ -3,7 +3,7 @@ @REM however it may be executed directly from the BaseTools project fold= er @REM if the file is not executed within a WORKSPACE\BaseTools folder. @REM -@REM Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+@REM Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
@REM (C) Copyright 2016 Hewlett Packard Enterprise Development LP
@REM @REM SPDX-License-Identifier: BSD-2-Clause-Patent @@ -42,6 +42,12 @@ if /I "%1"=3D=3D"/?" goto Usage set FORCE_REBUILD=3DTRUE goto loop ) + if /I "%1"=3D=3D"VS2019" ( + shift + set VS2019=3DTRUE + set VSTool=3DVS2019 + goto loop + ) if /I "%1"=3D=3D"VS2017" ( shift set VS2017=3DTRUE @@ -176,7 +182,9 @@ IF NOT exist "%EDK_TOOLS_PATH%\set_vsprefix_envs.bat" ( @echo. goto end ) -if defined VS2017 ( +if defined VS2019 ( + call %EDK_TOOLS_PATH%\set_vsprefix_envs.bat VS2019 +) else if defined VS2017 ( call %EDK_TOOLS_PATH%\set_vsprefix_envs.bat VS2017 ) else if defined VS2015 ( call %EDK_TOOLS_PATH%\set_vsprefix_envs.bat VS2015 @@ -444,7 +452,7 @@ goto end :Usage @echo. - echo Usage: "%0 [-h | -help | --help | /h | /help | /?] [ Rebuild | For= ceRebuild ] [Reconfig] [base_tools_path [edk_tools_path]] [VS2017] [VS2015]= [VS2013] [VS2012]" + echo Usage: "%0 [-h | -help | --help | /h | /help | /?] [ Rebuild | For= ceRebuild ] [Reconfig] [base_tools_path [edk_tools_path]] [VS2019] [VS2017]= [VS2015] [VS2013] [VS2012]" @echo. @echo base_tools_path BaseTools project path, BASE_TOOLS_PATH = will be set to this path. @echo edk_tools_path EDK_TOOLS_PATH will be set to this path. @@ -457,12 +465,14 @@ goto end @echo VS2013 Set the env for VS2013 build. @echo VS2015 Set the env for VS2015 build. @echo VS2017 Set the env for VS2017 build. + @echo VS2019 Set the env for VS2019 build. @echo. :end set REBUILD=3D set FORCE_REBUILD=3D set RECONFIG=3D +set VS2019=3D set VS2017=3D set VS2015=3D set VS2013=3D diff --git a/edksetup.bat b/edksetup.bat index 5f6028deff..024f57a4b7 100755 --- a/edksetup.bat +++ b/edksetup.bat @@ -1,7 +1,7 @@ @REM @file @REM Windows batch file to setup a WORKSPACE environment @REM -@REM Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
+@REM Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
@REM (C) Copyright 2016 Hewlett Packard Enterprise Development LP
@REM SPDX-License-Identifier: BSD-2-Clause-Patent @REM @@ -133,6 +133,7 @@ if defined CYGWIN_HOME ( :cygwin_done if /I "%1"=3D=3D"Rebuild" shift if /I "%1"=3D=3D"ForceRebuild" shift +if /I "%1"=3D=3D"VS2019" shift if /I "%1"=3D=3D"VS2017" shift if /I "%1"=3D=3D"VS2015" shift if /I "%1"=3D=3D"VS2013" shift @@ -141,7 +142,7 @@ if "%1"=3D=3D"" goto end :Usage @echo. - @echo Usage: "%0 [-h | -help | --help | /h | /help | /?] [Reconfig] [Re= build] [ForceRebuild] [VS2017] [VS2015] [VS2013] [VS2012]" + @echo Usage: "%0 [-h | -help | --help | /h | /help | /?] [Reconfig] [Re= build] [ForceRebuild] [VS2019] [VS2017] [VS2015] [VS2013] [VS2012]" @echo. @echo Reconfig Reinstall target.txt, tools_def.txt and bui= ld_rule.txt. @echo Rebuild Perform incremental rebuild of BaseTools bi= naries. @@ -150,6 +151,7 @@ if "%1"=3D=3D"" goto end @echo VS2013 Set the env for VS2013 build. @echo VS2015 Set the env for VS2015 build. @echo VS2017 Set the env for VS2017 build. + @echo VS2019 Set the env for VS2019 build. @echo. @echo Note that target.template, tools_def.template and build_rules.tem= plate @echo will only be copied to target.txt, tools_def.txt and build_rule.t= xt -- 2.21.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#47334): https://edk2.groups.io/g/devel/message/47334 Mute This Topic: https://groups.io/mt/34172666/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-