Skip to content

Commit 89b99f7

Browse files
committed
Smarter msvc assembler search.
1 parent ede52ac commit 89b99f7

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/tools/clang-win.jam

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,14 @@ rule init ( version ? : command * : options * )
141141
vswhere ?= [ os.environ "ProgramFiles" ] ;
142142
vswhere = "$(vswhere)/Microsoft Visual Studio/Installer/vswhere.exe" ;
143143
local vspath = [ SHELL "\"$(vswhere)\" -latest -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64" ] ;
144-
local vsasmpath = [ path.glob [ path.make "$(vspath)\\VC\\Tools\\MSVC" ] : */bin/*/*/$(target-assembler).exe ] ;
145-
vsasmpath = [ path.native $(vsasmpath[-1]) ] ;
144+
local msvcpath = [ path.glob [ path.make "$(vspath)\\VC\\Tools\\MSVC" ] : * ] ;
145+
msvcpath = [ path.glob "$(msvcpath[-1])/bin" : Host* ] ;
146+
msvcpath = [ path.glob "$(msvcpath)" : * ] ;
147+
local vsasmpath = [ path.glob "$(msvcpath)" : "$(target-assembler).*" ] ;
148+
if $(vsasmpath)
149+
{
150+
vsasmpath = [ path.native $(vsasmpath[-1]) ] ;
151+
}
146152

147153
local assembler = [ get-option "assembler" : $(addr) : $(options) ] ;
148154
local linker ;

0 commit comments

Comments
 (0)