code: def _linux_compile(output, objects, options, compile_cmd="g++"):
      cmd = [compile_cmd]
      if output.endswith(".so") or output.endswith(".dylib"):
          cmd += ["-shared", "-fPIC"]
          if sys.platform == "darwin":
              cmd += ["-undefined", "dynamic_lookup"]
      elif output.endswith(".obj"):
          cmd += ["-c"]
      cmd += ["-o", output]
      if isinstance(objects, str):
          cmd += [objects]
      else:
          cmd += objects
      if options:
          cmd += options
      proc = subprocess.Popen(
          cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT
      )
      (out, _) = proc.communicate()
      if proc.returncode != 0:
          msg = "Compilation error:\n"
          msg += str(out)
          raise RuntimeError(msg)
  
file_path: mxnet/contrib/tvmop/compile.py
imports: import tvm
  from tvm import autotvm
  import os
  import argparse
  import re
  import json
  import logging
  import sys
  import subprocess
  from tvmop.opdef import __OP_DEF__
  from tvmop.space import ConfigSpaces, ConfigSpace
  from tvm.autotvm.measure.measure_methods import set_cuda_target_arch
label_desc: Use image node_id 2 for calling a global function with example usage: _linux_compile(output, objects, options, compile_cmd) without return types