mirror of
https://github.com/boostorg/build.git
synced 2026-02-16 01:12:13 +00:00
Bufix. Don't change suffix for searched libraries on Windows, if suffix is
explicitly provided. Thanks to Kirill Lapshin for the bug report. [SVN r18918]
This commit is contained in:
@@ -21,6 +21,7 @@ import symlink ;
|
||||
import alias ;
|
||||
import property ;
|
||||
import print ;
|
||||
import utility ;
|
||||
|
||||
# This feature is used to determine which OS we're on.
|
||||
# In future, this may become <target-os> and <host-os>
|
||||
@@ -298,10 +299,11 @@ rule response-file ( target : sources * : properties * )
|
||||
response-file-2 $(target) : $(sources[2-]) ;
|
||||
}
|
||||
print.output $(target) ;
|
||||
print.text [ on $(target)
|
||||
return "$(LIBRARY_OPTION)$(FINDLIBS_ST:S=.lib)"
|
||||
"$(LIBRARY_OPTION)$(FINDLIBS_SA:S=.lib)"
|
||||
] : : suffix ;
|
||||
print.text [ utility.apply-default-suffix .lib :
|
||||
[ on $(target)
|
||||
return "$(LIBRARY_OPTION)$(FINDLIBS_ST)"
|
||||
"$(LIBRARY_OPTION)$(FINDLIBS_SA)"
|
||||
] ] ;
|
||||
}
|
||||
|
||||
actions quietly response-file-1
|
||||
|
||||
@@ -76,6 +76,26 @@ rule less ( a b )
|
||||
}
|
||||
}
|
||||
|
||||
# For all elements of 'list' which do not have a suffix,
|
||||
# add 'suffix'.
|
||||
rule apply-default-suffix ( suffix : list * )
|
||||
{
|
||||
local result ;
|
||||
for local i in $(list)
|
||||
{
|
||||
if $(i:S)
|
||||
{
|
||||
result += $(i) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
result += $(i:S=$(suffix)) ;
|
||||
}
|
||||
}
|
||||
return $(result) ;
|
||||
}
|
||||
|
||||
|
||||
local rule __test__ ( )
|
||||
{
|
||||
import assert ;
|
||||
@@ -110,6 +130,8 @@ local rule __test__ ( )
|
||||
assert.true equal 1 1 ;
|
||||
assert.false equal 1 2 ;
|
||||
assert.result "not sure" : equal [ new test-class__ ] 1 ;
|
||||
|
||||
assert.result foo.lib foo.a : apply-default-suffix .lib : foo foo.a ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -306,7 +306,6 @@ flags msvc LINKFLAGS <main-target-type>LIB/<link>shared : /DLL ;
|
||||
|
||||
toolset.flags msvc.link USER_LINKFLAGS <linkflags> ;
|
||||
toolset.flags msvc.link LINKPATH <library-path> ;
|
||||
toolset.flags msvc.link FINDLIBS <find-static-library> <find-shared-library> ;
|
||||
|
||||
flags builtin.response-file LIBRARY_PATH_OPTION <toolset>msvc : /LIBPATH: : unchecked ;
|
||||
flags builtin.response-file LIBRARY_OPTION <toolset>msvc : "" : unchecked ;
|
||||
@@ -353,6 +352,6 @@ else # CYGWIN
|
||||
|
||||
actions link
|
||||
{
|
||||
$(.LD) $(LINKFLAGS) /out:"$(<[1]:W)" $(.implib)"$(<[2]:W)" /LIBPATH:"$(LINKPATH:W)" "$(FINDLIBS:S=.lib)" $(USER_LINKFLAGS) @"$(>:W)"
|
||||
$(.LD) $(LINKFLAGS) /out:"$(<[1]:W)" $(.implib)"$(<[2]:W)" /LIBPATH:"$(LINKPATH:W)" $(USER_LINKFLAGS) @"$(>:W)"
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ import symlink ;
|
||||
import alias ;
|
||||
import property ;
|
||||
import print ;
|
||||
import utility ;
|
||||
|
||||
# This feature is used to determine which OS we're on.
|
||||
# In future, this may become <target-os> and <host-os>
|
||||
@@ -298,10 +299,11 @@ rule response-file ( target : sources * : properties * )
|
||||
response-file-2 $(target) : $(sources[2-]) ;
|
||||
}
|
||||
print.output $(target) ;
|
||||
print.text [ on $(target)
|
||||
return "$(LIBRARY_OPTION)$(FINDLIBS_ST:S=.lib)"
|
||||
"$(LIBRARY_OPTION)$(FINDLIBS_SA:S=.lib)"
|
||||
] : : suffix ;
|
||||
print.text [ utility.apply-default-suffix .lib :
|
||||
[ on $(target)
|
||||
return "$(LIBRARY_OPTION)$(FINDLIBS_ST)"
|
||||
"$(LIBRARY_OPTION)$(FINDLIBS_SA)"
|
||||
] ] ;
|
||||
}
|
||||
|
||||
actions quietly response-file-1
|
||||
|
||||
@@ -306,7 +306,6 @@ flags msvc LINKFLAGS <main-target-type>LIB/<link>shared : /DLL ;
|
||||
|
||||
toolset.flags msvc.link USER_LINKFLAGS <linkflags> ;
|
||||
toolset.flags msvc.link LINKPATH <library-path> ;
|
||||
toolset.flags msvc.link FINDLIBS <find-static-library> <find-shared-library> ;
|
||||
|
||||
flags builtin.response-file LIBRARY_PATH_OPTION <toolset>msvc : /LIBPATH: : unchecked ;
|
||||
flags builtin.response-file LIBRARY_OPTION <toolset>msvc : "" : unchecked ;
|
||||
@@ -353,6 +352,6 @@ else # CYGWIN
|
||||
|
||||
actions link
|
||||
{
|
||||
$(.LD) $(LINKFLAGS) /out:"$(<[1]:W)" $(.implib)"$(<[2]:W)" /LIBPATH:"$(LINKPATH:W)" "$(FINDLIBS:S=.lib)" $(USER_LINKFLAGS) @"$(>:W)"
|
||||
$(.LD) $(LINKFLAGS) /out:"$(<[1]:W)" $(.implib)"$(<[2]:W)" /LIBPATH:"$(LINKPATH:W)" $(USER_LINKFLAGS) @"$(>:W)"
|
||||
}
|
||||
|
||||
|
||||
@@ -76,6 +76,26 @@ rule less ( a b )
|
||||
}
|
||||
}
|
||||
|
||||
# For all elements of 'list' which do not have a suffix,
|
||||
# add 'suffix'.
|
||||
rule apply-default-suffix ( suffix : list * )
|
||||
{
|
||||
local result ;
|
||||
for local i in $(list)
|
||||
{
|
||||
if $(i:S)
|
||||
{
|
||||
result += $(i) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
result += $(i:S=$(suffix)) ;
|
||||
}
|
||||
}
|
||||
return $(result) ;
|
||||
}
|
||||
|
||||
|
||||
local rule __test__ ( )
|
||||
{
|
||||
import assert ;
|
||||
@@ -110,6 +130,8 @@ local rule __test__ ( )
|
||||
assert.true equal 1 1 ;
|
||||
assert.false equal 1 2 ;
|
||||
assert.result "not sure" : equal [ new test-class__ ] 1 ;
|
||||
|
||||
assert.result foo.lib foo.a : apply-default-suffix .lib : foo foo.a ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user