From nobody Mon Feb 9 16:51:06 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+64140+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+64140+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1597300851; cv=none; d=zohomail.com; s=zohoarc; b=mwdPl9gMVvp0Vh1Ff2oxGWouZVeuiYWEvHiGPXLAmu2bcnylfl1zpoJcV33I0dS7eLc+9eJLTHlHY9JbImPzCvP+0XkmkV6P6eo/BCAUvQjPh9r+89wCaeGobUT55ElF/bEz3PnhjfDoOxmTt2a/JXJtHY3WfaxyU8oNn5SR5lU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1597300851; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=96CJewdphXktk4tSNnrLfQtVRLu+C0WgrPcWrrfeABs=; b=KsyzAlFruThufEO7f/tNtE2oUbwFgfz3kJyTfgqPpxH1nkeT3U+Ig8UnVTm7ElLI7ROAZW53VINCAMjO0I97h8wy6LKlHOz2xXCod1VYYjqQasoK+u9RcCnKsIlPqQj4pFv3BLmy/Eb/NM7qX9jOL2wZVbG5P+pPo0wVfdQM3mk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+64140+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 1597300851739154.31397836525832; Wed, 12 Aug 2020 23:40:51 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 74r5YY1788612xxoTlWtwMfs; Wed, 12 Aug 2020 23:40:51 -0700 X-Received: from mga04.intel.com (mga04.intel.com []) by mx.groups.io with SMTP id smtpd.web12.5009.1597300847223902142 for ; Wed, 12 Aug 2020 23:40:49 -0700 IronPort-SDR: 3kYwmGRUUC+CAbHHJeOGzU4m/FhAMhDG5DKIEm4lWTWna2tzHDYyX7Xybg76X0zU0lioksQkcd K5uzNXijOazw== X-IronPort-AV: E=McAfee;i="6000,8403,9711"; a="151590406" X-IronPort-AV: E=Sophos;i="5.76,307,1592895600"; d="scan'208";a="151590406" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Aug 2020 23:40:47 -0700 IronPort-SDR: +WYogC6r11LvSNhaLVlfNInkUyXC13ldVZsFZb/pkO+WbbvMJoSQQeSYDBwWuUbT2mrx5n2edl viulcKUJ2ICA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,307,1592895600"; d="scan'208";a="470109679" X-Received: from shwde7172.ccr.corp.intel.com ([10.239.154.19]) by orsmga005.jf.intel.com with ESMTP; 12 Aug 2020 23:40:47 -0700 From: "Liming Gao" To: devel@edk2.groups.io Cc: Bob Feng , Yuwei Chen Subject: [edk2-devel] [Patch 2/2] BaseTools: Fix the issue in VS prefix setting for VS2017/VS2019 Date: Thu, 13 Aug 2020 14:40:40 +0800 Message-Id: <20200813064040.1683-3-liming.gao@intel.com> In-Reply-To: <20200813064040.1683-1-liming.gao@intel.com> References: <20200813064040.1683-1-liming.gao@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,liming.gao@intel.com X-Gm-Message-State: EXfxwblAmchdpfJbewsKuvwCx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1597300851; bh=BrUoJGGy6XiwFHtem4zeIdcY707y/teHYtMWi5XaJgA=; h=Cc:Date:From:Reply-To:Subject:To; b=VE0tZrZGqQSHlEtQXm+FT3JMxjyVsu0A9uSh9OTSFuqqwXzj2PEgRx6YVunRta2EW5R +NFiuPSzYAlcRKntZ5pd6aNvkimsGotM7OhGIQJTE80mrRe2jKHXVHbtxX3Zh3E2YwAS7 QzOV2JgO3xS/3pdDzL1ZwcRLiRVMTtgAesY= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2896 When VS2017/VS2019 are both installed. VS prefix setting will wrongly be set. VS2017_PREFIX is set to the same value of VS2019. This patch clears VSINSTALLDIR and VCToolsVersion env, then the different vcvars32 can set the correct VS env. Signed-off-by: Liming Gao Cc: Bob Feng Cc: Yuwei Chen Reviewed-by: Bob Feng --- BaseTools/set_vsprefix_envs.bat | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/BaseTools/set_vsprefix_envs.bat b/BaseTools/set_vsprefix_envs.= bat index 38fb0eb260..2627587ba3 100644 --- a/BaseTools/set_vsprefix_envs.bat +++ b/BaseTools/set_vsprefix_envs.bat @@ -110,6 +110,9 @@ if /I "%1"=3D=3D"VS2015" goto SetWinDDK =20 :SetVS2017 if not defined VS150COMNTOOLS ( + @REM clear two envs so that vcvars32.bat can run successfully. + set VSINSTALLDIR=3D + set VCToolsVersion=3D if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.= exe" ( if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\BuildTools"= ( call "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.= exe" -products Microsoft.VisualStudio.Product.BuildTools -version 15,16 > v= swhereInfo @@ -166,6 +169,9 @@ if not defined WINSDK_PATH_FOR_RC_EXE ( =20 :SetVS2019 if not defined VS160COMNTOOLS ( + @REM clear two envs so that vcvars32.bat can run successfully. + set VSINSTALLDIR=3D + set VCToolsVersion=3D 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 --=20 2.27.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 (#64140): https://edk2.groups.io/g/devel/message/64140 Mute This Topic: https://groups.io/mt/76163156/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-