Skip to content

Commit

Permalink
build: conditionally clear vcinstalldir
Browse files Browse the repository at this point in the history
For scenario where target env is explicitly specified as vs2019, do
not clear VCINSTALLDIR which was being cleared to handle fallback to
vs2017 block when attempting to find a matching available VS.

Fixes: #35856

PR-URL: #36009
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
  • Loading branch information
bingenito authored and codebytere committed Nov 22, 2020
1 parent 6a4cc43 commit fbe210b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vcbuild.bat
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ echo Looking for Visual Studio 2019
@rem VCINSTALLDIR may be set if run from a VS Command Prompt and needs to be
@rem cleared first as vswhere_usability_wrapper.cmd doesn't when it fails to
@rem detect the version searched for
set "VCINSTALLDIR="
if not defined target_env set "VCINSTALLDIR="
call tools\msvs\vswhere_usability_wrapper.cmd "[16.0,17.0)"
if "_%VCINSTALLDIR%_" == "__" goto msbuild-not-found
set "WIXSDKDIR=%WIX%\SDK\VS2017"
Expand Down

0 comments on commit fbe210b

Please sign in to comment.