mirror of
https://github.com/boostorg/build.git
synced 2026-02-16 01:12:13 +00:00
Prevent 'hardcode-dll-paths' from setting rpath on static libraries.
Thanks to Ali Azarbayejani for the bug report. [SVN r17999]
This commit is contained in:
@@ -240,14 +240,29 @@ if [ os.name ] = NT # must be conditional; we'll error on other OSes
|
||||
}
|
||||
|
||||
|
||||
flags builtin.response-file LIBRARIES <library> ;
|
||||
|
||||
# response-file generation is broken up into two phases, the first of
|
||||
# which overwrites any existing file and the second of which appends
|
||||
# to the file, piecemeal, so that no command-line is too long.
|
||||
rule response-file ( target : sources * : properties * )
|
||||
{
|
||||
sources += [ on $(target) return $(LIBRARIES) ] ;
|
||||
# Add libraries from <library> property to the list of sources.
|
||||
local libraries ;
|
||||
for local p in $(properties)
|
||||
{
|
||||
if $(p:G) = <library> &&
|
||||
! [ type.is-derived [ $(p:G=).type ] SHARED_LIB ]
|
||||
{
|
||||
libraries += $(p:G=) ;
|
||||
}
|
||||
}
|
||||
# Get real jam targets
|
||||
local xlibraries ;
|
||||
for local l in $(libraries)
|
||||
{
|
||||
xlibraries += [ $(l).actualize ] ;
|
||||
}
|
||||
|
||||
sources += $(xlibraries) ;
|
||||
|
||||
response-file-1 $(target) : $(sources[1]) ;
|
||||
if $(sources[2-])
|
||||
@@ -511,24 +526,25 @@ rule link-action ( targets + : sources * : action-name : properties * )
|
||||
if [ class.is-a $(s) : searched-lib-target ]
|
||||
{
|
||||
local name = [ $(s).real-name ] ;
|
||||
local search = [ $(s).search ] ;
|
||||
if [ $(s).shared ]
|
||||
{
|
||||
properties2 += <find-shared-library>$(name) ;
|
||||
if $(hardcore-rpath)
|
||||
{
|
||||
rpaths += $(search) ;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
properties2 += <find-static-library>$(name) ;
|
||||
}
|
||||
local search = [ $(s).search ] ;
|
||||
if $(hardcore-rpath)
|
||||
{
|
||||
rpaths += $(search) ;
|
||||
}
|
||||
properties2 += <library-path>$(search) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
if $(hardcore-rpath)
|
||||
if $(hardcore-rpath) &&
|
||||
[ type.is-derived [ $(s).type ] SHARED_LIB ]
|
||||
{
|
||||
rpaths += [ path.root [ $(s).path ] $(pwd) ] ;
|
||||
}
|
||||
|
||||
@@ -240,14 +240,29 @@ if [ os.name ] = NT # must be conditional; we'll error on other OSes
|
||||
}
|
||||
|
||||
|
||||
flags builtin.response-file LIBRARIES <library> ;
|
||||
|
||||
# response-file generation is broken up into two phases, the first of
|
||||
# which overwrites any existing file and the second of which appends
|
||||
# to the file, piecemeal, so that no command-line is too long.
|
||||
rule response-file ( target : sources * : properties * )
|
||||
{
|
||||
sources += [ on $(target) return $(LIBRARIES) ] ;
|
||||
# Add libraries from <library> property to the list of sources.
|
||||
local libraries ;
|
||||
for local p in $(properties)
|
||||
{
|
||||
if $(p:G) = <library> &&
|
||||
! [ type.is-derived [ $(p:G=).type ] SHARED_LIB ]
|
||||
{
|
||||
libraries += $(p:G=) ;
|
||||
}
|
||||
}
|
||||
# Get real jam targets
|
||||
local xlibraries ;
|
||||
for local l in $(libraries)
|
||||
{
|
||||
xlibraries += [ $(l).actualize ] ;
|
||||
}
|
||||
|
||||
sources += $(xlibraries) ;
|
||||
|
||||
response-file-1 $(target) : $(sources[1]) ;
|
||||
if $(sources[2-])
|
||||
@@ -511,24 +526,25 @@ rule link-action ( targets + : sources * : action-name : properties * )
|
||||
if [ class.is-a $(s) : searched-lib-target ]
|
||||
{
|
||||
local name = [ $(s).real-name ] ;
|
||||
local search = [ $(s).search ] ;
|
||||
if [ $(s).shared ]
|
||||
{
|
||||
properties2 += <find-shared-library>$(name) ;
|
||||
if $(hardcore-rpath)
|
||||
{
|
||||
rpaths += $(search) ;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
properties2 += <find-static-library>$(name) ;
|
||||
}
|
||||
local search = [ $(s).search ] ;
|
||||
if $(hardcore-rpath)
|
||||
{
|
||||
rpaths += $(search) ;
|
||||
}
|
||||
properties2 += <library-path>$(search) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
if $(hardcore-rpath)
|
||||
if $(hardcore-rpath) &&
|
||||
[ type.is-derived [ $(s).type ] SHARED_LIB ]
|
||||
{
|
||||
rpaths += [ path.root [ $(s).path ] $(pwd) ] ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user