parameters: (self, additional_tool_dirs=[], required=True,
                  use_installed=False)
return_statement: return was_found
docstring: Configure the test suite to be able to invoke lld.
  
          Sets up some environment variables important to lld, locates a
          just-built or optionally an installed lld, and add a set of standard
          substitutions useful to any test suite that makes use of lld.
docstring_summary: Configure the test suite to be able to invoke lld.
docstring_tokens: Configure the test suite to be able to invoke lld .
function: def use_lld(self, additional_tool_dirs=[], required=True,
                  use_installed=False):
          """Configure the test suite to be able to invoke lld.
  
          Sets up some environment variables important to lld, locates a
          just-built or optionally an installed lld, and add a set of standard
          substitutions useful to any test suite that makes use of lld.
  
          """
  
          # Tweak the PATH to include the tools dir and the scripts dir.
          exe_dir_props = [self.config.name.lower() + '_tools_dir',
                           'lld_tools_dir', 'llvm_tools_dir']
          paths = [getattr(self.config, pp) for pp in exe_dir_props
                   if getattr(self.config, pp, None)]
          paths = additional_tool_dirs + paths
          self.with_environment('PATH', paths, append_path=True)
  
          lib_dir_props = [self.config.name.lower() + '_libs_dir',
                           'lld_libs_dir', 'llvm_libs_dir']
          lib_paths = [getattr(self.config, pp) for pp in lib_dir_props
                       if getattr(self.config, pp, None)]
  
          self.with_environment('LD_LIBRARY_PATH', lib_paths, append_path=True)
  
          # Discover the LLD executables to use.
  
          ld_lld = self.use_llvm_tool('ld.lld', required=required,
                                      search_paths=paths,
                                      use_installed=use_installed)
          lld_link = self.use_llvm_tool('lld-link', required=required,
                                        search_paths=paths,
                                        use_installed=use_installed)
          ld64_lld = self.use_llvm_tool('ld64.lld', required=required,
                                        search_paths=paths,
                                        use_installed=use_installed)
          wasm_ld = self.use_llvm_tool('wasm-ld', required=required,
                                       search_paths=paths,
                                       use_installed=use_installed)
  
          was_found = ld_lld and lld_link and ld64_lld and wasm_ld
          tool_substitutions = []
          if ld_lld:
              tool_substitutions.append(ToolSubst(r'ld\.lld', command=ld_lld))
              self.config.available_features.add('ld.lld')
          if lld_link:
              tool_substitutions.append(ToolSubst('lld-link', command=lld_link))
              self.config.available_features.add('lld-link')
          if ld64_lld:
              tool_substitutions.append(ToolSubst(r'ld64\.lld', command=ld64_lld))
              self.config.available_features.add('ld64.lld')
          if wasm_ld:
              tool_substitutions.append(ToolSubst('wasm-ld', command=wasm_ld))
              self.config.available_features.add('wasm-ld')
          self.add_tool_substitutions(tool_substitutions)
  
          return was_found
function_tokens: def use_lld ( self , additional_tool_dirs = [ ] , required = True , use_installed = False ) : # Tweak the PATH to include the tools dir and the scripts dir. exe_dir_props = [ self . config . name . lower ( ) + '_tools_dir' , 'lld_tools_dir' , 'llvm_tools_dir' ] paths = [ getattr ( self . config , pp ) for pp in exe_dir_props if getattr ( self . config , pp , None ) ] paths = additional_tool_dirs + paths self . with_environment ( 'PATH' , paths , append_path = True ) lib_dir_props = [ self . config . name . lower ( ) + '_libs_dir' , 'lld_libs_dir' , 'llvm_libs_dir' ] lib_paths = [ getattr ( self . config , pp ) for pp in lib_dir_props if getattr ( self . config , pp , None ) ] self . with_environment ( 'LD_LIBRARY_PATH' , lib_paths , append_path = True ) # Discover the LLD executables to use. ld_lld = self . use_llvm_tool ( 'ld.lld' , required = required , search_paths = paths , use_installed = use_installed ) lld_link = self . use_llvm_tool ( 'lld-link' , required = required , search_paths = paths , use_installed = use_installed ) ld64_lld = self . use_llvm_tool ( 'ld64.lld' , required = required , search_paths = paths , use_installed = use_installed ) wasm_ld = self . use_llvm_tool ( 'wasm-ld' , required = required , search_paths = paths , use_installed = use_installed ) was_found = ld_lld and lld_link and ld64_lld and wasm_ld tool_substitutions = [ ] if ld_lld : tool_substitutions . append ( ToolSubst ( r'ld\.lld' , command = ld_lld ) ) self . config . available_features . add ( 'ld.lld' ) if lld_link : tool_substitutions . append ( ToolSubst ( 'lld-link' , command = lld_link ) ) self . config . available_features . add ( 'lld-link' ) if ld64_lld : tool_substitutions . append ( ToolSubst ( r'ld64\.lld' , command = ld64_lld ) ) self . config . available_features . add ( 'ld64.lld' ) if wasm_ld : tool_substitutions . append ( ToolSubst ( 'wasm-ld' , command = wasm_ld ) ) self . config . available_features . add ( 'wasm-ld' ) self . add_tool_substitutions ( tool_substitutions ) return was_found