1
0
mirror of https://github.com/facebook/proxygen.git synced 2025-08-07 07:02:53 +03:00

getdeps: teach builder how to find vs 2019

Summary:
GitHub Actions CI `windows-latest` environment has only VS 2019
installed, so we need to expand our logic to be able to locate it.

Note that Boost 1.69 doesn't know how to locate VS 2019 so we are effectively
tied to VS 2017 at the moment; the search order in this diff reflects that.

(That means that we can't target `windows-latest` on GitHub Actions, but that
is really a concern for a later diff in this stack)

Reviewed By: simpkins

Differential Revision: D17385052

fbshipit-source-id: 9bb0612154f42d425a625406488f39bb4ec3d8ae
This commit is contained in:
Wez Furlong
2019-09-16 12:55:43 -07:00
committed by Facebook Github Bot
parent a798142759
commit faa13e42ad

View File

@@ -97,20 +97,25 @@ class BuildOptions(object):
# On Windows, the compiler is not available in the PATH by
# default so we need to run the vcvarsall script to populate the
# environment. We use a glob to find some version of this script
# as deployed with Visual Studio 2017. This logic will need
# updating when we switch to a newer compiler.
vcvarsall = glob.glob(
os.path.join(
os.environ["ProgramFiles(x86)"],
"Microsoft Visual Studio",
"2017",
"*",
"VC",
"Auxiliary",
"Build",
"vcvarsall.bat",
# as deployed with Visual Studio 2017. This logic can also
# locate Visual Studio 2019 but note that at the time of writing
# the version of boost in our manifest cannot be built with
# VS 2019, so we're effectively tied to VS 2017 until we upgrade
# the boost dependency.
vcvarsall = []
for year in ["2017", "2019"]:
vcvarsall += glob.glob(
os.path.join(
os.environ["ProgramFiles(x86)"],
"Microsoft Visual Studio",
year,
"*",
"VC",
"Auxiliary",
"Build",
"vcvarsall.bat",
)
)
)
vcvars_path = vcvarsall[0]
self.vcvars_path = vcvars_path