* build/generators.jam: (select-alternative): Use string comparison
of virtual targets, not the deep one with the 'str' method. The latter is very slow * tools/gcc.jam: Don't declare gcc.link and gcc.link.dll generators, as they are already inherited from unix.jam. If we declare them, then for each targets, the whole generation process is run twice. As result, select-alternative is called for each target, and due to sloweness of 'str' the performance is horrible. The net result is that running time on one testcase is down from 1580 secs to less than 10. [SVN r25512]
This commit is contained in:
parent
c159794338
commit
db023ae4e0
@ -590,8 +590,13 @@ rule register ( g )
|
||||
}
|
||||
|
||||
# Update the set of generators for toolset
|
||||
|
||||
# TODO: should we check that generator with this id
|
||||
# is not already registered. For example, the fop.jam
|
||||
# module intentionally declared two generators with the
|
||||
# same id, so such check will break it.
|
||||
local id = [ $(g).id ] ;
|
||||
|
||||
|
||||
# Some generators have multiple periods in their name, so the
|
||||
# normal $(id:S=) won't generate the right toolset name.
|
||||
# e.g. if id = gcc.compile.c++, then
|
||||
@ -885,11 +890,17 @@ local rule select-dependency-graph ( options )
|
||||
generators.dout $(r) ;
|
||||
}
|
||||
|
||||
# One note why we can compare object names directly,
|
||||
# without using deep copy. All the targets here are
|
||||
# produced by some generators, and generators should
|
||||
# pass the targets they've returned via 'virtual-target.register'.
|
||||
# So, two elements can only be equivalent, if they are just
|
||||
# the same object.
|
||||
local f = [ $(options).at 1 ] ;
|
||||
local mismatch ;
|
||||
for local r in [ $(results).get ]
|
||||
{
|
||||
if ! [ utility.equal $(r) $(f) ]
|
||||
if [ $(r).get ] != [ $(f).get ]
|
||||
{
|
||||
mismatch = true ;
|
||||
}
|
||||
|
@ -155,14 +155,6 @@ class gcc-linking-generator : unix-linking-generator
|
||||
}
|
||||
}
|
||||
|
||||
generators.register [ new gcc-linking-generator gcc.link : LIB OBJ : EXE
|
||||
: <toolset>gcc ] ;
|
||||
|
||||
generators.register [ new gcc-linking-generator gcc.link.dll : LIB OBJ : SHARED_LIB
|
||||
: <toolset>gcc ] ;
|
||||
|
||||
|
||||
|
||||
|
||||
# Declare flags and action for linking
|
||||
flags gcc.link OPTIONS <debug-symbols>on : -g ;
|
||||
|
Loading…
Reference in New Issue
Block a user