code: def _linux_ar(output, inputs, ar):
      ar = ar or "ar"
  
      libname = os.path.basename(output)
      if not libname.startswith("lib"):
          libname = "lib" + libname
      temp = _utils.tempdir()
      temp_output = temp.relpath(libname)
      cmd = [ar, "-crs", temp_output]
  
      # handles the case where some input files are tar of objects
      # unpack them and return the list of files inside
      objects = _tar.normalize_file_list_by_unpacking_tars(temp, inputs)
  
      cmd += objects
      proc = subprocess.Popen(
          cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT
      )
      (out, _) = proc.communicate()
      if proc.returncode != 0:
          msg = "AR error:\n"
          msg += py_str(out)
          msg += "\nCommand line: " + " ".join(cmd)
          raise RuntimeError(msg)
  
      shutil.move(temp_output, output)
  
file_path: tvm/python/tvm/contrib/cc.py
imports: import sys
  import shutil
  import os
  import subprocess
  from .None import utils, tar
  from .._ffi.base import py_str
label_desc: Use image node_id 5 for calling a global function with example usage: _linux_ar(output, inputs, ar) without return types