Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions doc/src/history.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
* *New*: Add minimal https://ecostd.github.io/[EcoStd] support. Minimal being
self introspection information output.
-- _René Ferdinand Rivera Morell_
* Fix `clang-win` toolset initialization error, `missing argument native` from
`path.make`, on machines where `vswhere` does not find a Visual Studio
installation. The VS detection now includes Build Tools installs
(`vswhere -products *`), and a missing VS install is no longer a hard error.
-- _Sam Darwin_

== Version 5.5.3

Expand Down
29 changes: 20 additions & 9 deletions src/tools/clang-win.jam
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,26 @@ rule init ( version ? : command * : options * )
local vswhere = [ os.environ "ProgramFiles(x86)" ] ;
vswhere ?= [ os.environ "ProgramFiles" ] ;
vswhere = "$(vswhere)/Microsoft Visual Studio/Installer/vswhere.exe" ;
local vspath = [ SPLIT_BY_CHARACTERS [ SHELL
"\"$(vswhere)\" -latest -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath"
] : "\r\n" ] ;
vspath = $(vspath[1]) ;
.notice "$(arch)-$(addr):" "using VS tools in '$(vspath)'" ;
local msvcpath = [ path.glob [ path.make "$(vspath)\\VC\\Tools\\MSVC" ] : * ] ;
msvcpath = [ path.glob "$(msvcpath[-1])/bin" : Host* ] ;
msvcpath = [ path.glob "$(msvcpath)" : * ] ;
.notice "$(arch)-$(addr):" "using msvc tools in" "'$(msvcpath)'" ;
local vspath ;
if [ path.exists $(vswhere) ]
{
# The "-products *" also finds Build Tools installs, which
# vswhere skips by default. Quoting the "*" is for when we are
# a Cygwin build, to bypass /bin/sh.
vspath = [ SPLIT_BY_CHARACTERS [ SHELL
"\"$(vswhere)\" -latest -products \"*\" -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath"
] : "\r\n" ] ;
vspath = $(vspath[1]) ;
}
.notice "$(arch)-$(addr):" "using VS tools in '$(vspath:E=)'" ;
local msvcpath ;
if $(vspath)
{
msvcpath = [ path.glob [ path.make "$(vspath)\\VC\\Tools\\MSVC" ] : * ] ;
msvcpath = [ path.glob "$(msvcpath[-1])/bin" : Host* ] ;
msvcpath = [ path.glob "$(msvcpath)" : * ] ;
}
.notice "$(arch)-$(addr):" "using msvc tools in" "'$(msvcpath:E=)'" ;
local vsasmpath = [ path.glob "$(msvcpath)" : "$(target-assembler).*" ] ;
if $(vsasmpath)
{
Expand Down
Loading