Commit fe1ec310 authored by Wez Furlong's avatar Wez Furlong Committed by Facebook Github Bot

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
parent 116dea9d
...@@ -97,20 +97,25 @@ class BuildOptions(object): ...@@ -97,20 +97,25 @@ class BuildOptions(object):
# On Windows, the compiler is not available in the PATH by # On Windows, the compiler is not available in the PATH by
# default so we need to run the vcvarsall script to populate the # default so we need to run the vcvarsall script to populate the
# environment. We use a glob to find some version of this script # environment. We use a glob to find some version of this script
# as deployed with Visual Studio 2017. This logic will need # as deployed with Visual Studio 2017. This logic can also
# updating when we switch to a newer compiler. # locate Visual Studio 2019 but note that at the time of writing
vcvarsall = glob.glob( # the version of boost in our manifest cannot be built with
os.path.join( # VS 2019, so we're effectively tied to VS 2017 until we upgrade
os.environ["ProgramFiles(x86)"], # the boost dependency.
"Microsoft Visual Studio", vcvarsall = []
"2017", for year in ["2017", "2019"]:
"*", vcvarsall += glob.glob(
"VC", os.path.join(
"Auxiliary", os.environ["ProgramFiles(x86)"],
"Build", "Microsoft Visual Studio",
"vcvarsall.bat", year,
"*",
"VC",
"Auxiliary",
"Build",
"vcvarsall.bat",
)
) )
)
vcvars_path = vcvarsall[0] vcvars_path = vcvarsall[0]
self.vcvars_path = vcvars_path self.vcvars_path = vcvars_path
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment