@ -174,7 +174,8 @@ class Builder:
self . func_sizes = func_sizes
self . func_sizes = func_sizes
def __init__ ( self , toolchains , base_dir , git_dir , num_threads , num_jobs ,
def __init__ ( self , toolchains , base_dir , git_dir , num_threads , num_jobs ,
gnu_make = ' make ' , checkout = True , show_unknown = True , step = 1 ) :
gnu_make = ' make ' , checkout = True , show_unknown = True , step = 1 ,
no_subdirs = False ) :
""" Create a new Builder object
""" Create a new Builder object
Args :
Args :
@ -213,6 +214,7 @@ class Builder:
self . _step = step
self . _step = step
self . in_tree = False
self . in_tree = False
self . _error_lines = 0
self . _error_lines = 0
self . no_subdirs = no_subdirs
self . col = terminal . Color ( )
self . col = terminal . Color ( )
@ -392,15 +394,17 @@ class Builder:
Args :
Args :
commit_upto : Commit number to use ( 0. . self . count - 1 )
commit_upto : Commit number to use ( 0. . self . count - 1 )
"""
"""
commit_dir = None
if self . commits :
if self . commits :
commit = self . commits [ commit_upto ]
commit = self . commits [ commit_upto ]
subject = commit . subject . translate ( trans_valid_chars )
subject = commit . subject . translate ( trans_valid_chars )
commit_dir = ( ' %02d _of_ %02d _g %s _ %s ' % ( commit_upto + 1 ,
commit_dir = ( ' %02d _of_ %02d _g %s _ %s ' % ( commit_upto + 1 ,
self . commit_count , commit . hash , subject [ : 20 ] ) )
self . commit_count , commit . hash , subject [ : 20 ] ) )
else :
elif not self . no_subdirs :
commit_dir = ' current '
commit_dir = ' current '
output_dir = os . path . join ( self . base_dir , commit_dir )
if not commit_dir :
return output_dir
return self . base_dir
return os . path . join ( self . base_dir , commit_dir )
def GetBuildDir ( self , commit_upto , target ) :
def GetBuildDir ( self , commit_upto , target ) :
""" Get the name of the build directory for a commit number
""" Get the name of the build directory for a commit number