mirror of
https://github.com/boostorg/build.git
synced 2026-02-14 00:32:11 +00:00
Make code safer when attempting to use shell fails and there are no items.
This commit is contained in:
@@ -100,22 +100,36 @@ rule init ( version ? : command * : options * )
|
||||
}
|
||||
}
|
||||
|
||||
local ml = [ regex.replace $(items[1]) "x64\\\\+link\\.exe" "x64\\ml64.exe" ] ;
|
||||
ml = [ regex.replace $(ml) "x86\\\\+link\\.exe" "x86\\ml.exe" ] ;
|
||||
|
||||
if ! [ MATCH "(ml\\.exe)" "(ml64\\.exe)" : $(ml) ]
|
||||
local ml ;
|
||||
|
||||
if $(items)
|
||||
{
|
||||
ml = ;
|
||||
ml = [ regex.replace $(items[1]) "x64\\\\+link\\.exe" "x64\\ml64.exe" ] ;
|
||||
ml = [ regex.replace $(ml) "x86\\\\+link\\.exe" "x86\\ml.exe" ] ;
|
||||
|
||||
if ! [ MATCH "(ml\\.exe)" "(ml64\\.exe)" : $(ml) ]
|
||||
{
|
||||
ml = ;
|
||||
}
|
||||
}
|
||||
|
||||
local assembler = [ get-option "assembler" : $(addr) : $(options) ] ;
|
||||
assembler ?= $(ml) ;
|
||||
if $(addr) = 32 { assembler ?= ml.exe ; } else { assembler ?= ml64.exe ; }
|
||||
|
||||
local link = [ regex.replace $(items[1]) "\\\\+HostX64\\\\+x86\\\\+" "\\HostX86\\x86\\" ] ;
|
||||
local link ;
|
||||
|
||||
if $(items)
|
||||
{
|
||||
link = [ regex.replace $(items[1]) "\\\\+HostX64\\\\+x86\\\\+" "\\HostX86\\x86\\" ] ;
|
||||
}
|
||||
|
||||
local archiver = [ get-option "archiver" : $(addr) : $(options) ] ;
|
||||
archiver ?= "$(link) /lib" ;
|
||||
|
||||
if $(link)
|
||||
{
|
||||
archiver ?= "$(link) /lib" ;
|
||||
}
|
||||
archiver ?= lib.exe ;
|
||||
|
||||
.notice "$(addr):" "using assembler '$(assembler)'" ;
|
||||
|
||||
Reference in New Issue
Block a user