#NEWLINE# @ feature ( 'cprogram' , 'cshlib' , 'cstaticlib' ) #NEWLINE# @ after ( 'apply_core' ) #NEWLINE# def apply_link( self ) : #NEWLINE# #INDENT# "executes after apply_core for collecting 'compiled_tasks'\n\tuse a custom linker if specified (self.link='name-of-custom-link-task')" #NEWLINE# link = getattr ( self , 'link' , None ) #NEWLINE# if ( not link ) : #NEWLINE# #INDENT# if ( 'cstaticlib' in self . features ) : #NEWLINE# #INDENT# link = 'static_link' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( 'cxx' in self . features ) : #NEWLINE# #INDENT# link = 'cxx_link' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# link = 'cc_link' #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# tsk = self . create_task ( link ) #NEWLINE# outputs = [ t . outputs [ 0 ] for t in self . compiled_tasks ] #NEWLINE# tsk . set_inputs ( outputs ) #NEWLINE# tsk . set_outputs ( self . path . find_or_declare ( get_target_name ( self ) ) ) #NEWLINE# self . link_task = tsk