BAZEL_VS / BAZEL_VC don't account for custom install locations well. #11259
Labels
area-Windows
Windows-specific issues and feature requests
P1
I'll work on this now. (Assignee required)
team-OSS
Issues for the Bazel OSS team: installation, release processBazel packaging, website
type: bug
Bazel fails to find vc installation.
I'm trying to use bazel with a non-standard ms_buildtools install location, and it fails to find all the tools.
Specifically, I've installed ms_buildtools like this:
--locale en-US --installPath C:\BuildTools --config config.txt
config.txt:
{
"version": "1.0",
"components": [
"Microsoft.VisualStudio.Component.Roslyn.Compiler",
"Microsoft.Component.MSBuild",
"Microsoft.VisualStudio.Component.CoreBuildTools",
"Microsoft.VisualStudio.Workload.MSBuildTools",
"Microsoft.VisualStudio.Component.Windows10SDK",
"Microsoft.VisualStudio.Component.VC.CoreBuildTools",
"Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
"Microsoft.VisualStudio.Component.VC.Redist.14.Latest",
"Microsoft.VisualStudio.Component.Windows10SDK.18362",
"Microsoft.VisualStudio.Component.VC.CMake.Project",
"Microsoft.VisualStudio.Component.TestTools.BuildTools",
"Microsoft.Net.Component.4.8.SDK",
"Microsoft.Net.Component.4.6.1.TargetingPack",
"Microsoft.VisualStudio.Component.VC.CLI.Support",
"Microsoft.VisualStudio.Component.VC.ASAN",
"Microsoft.VisualStudio.Workload.VCTools"
]
}
When running bazel build, it doesn't really matter what I set BAZEL_VC to, bazel fails to find the file VCVARSALL.BAT
in this configuration VCVARSALL.bat lives here:
C:\BuildTools\VC\Auxiliary\Build
while cl.exe, etc live here (among other places)
C:\BuildTools\VC\Tools\MSVC\14.25.28610\bin\Hostx64\x64
The windows_cc_configure.bzl file knows about this, but it looks at the path to determine the version. Since BuildTools does not include the magic string 2019, this fails.
It seems more reasonable to match against the file layout.
The text was updated successfully, but these errors were encountered: