code: def create_dylib(
      output, objects, arch, sdk="macosx", min_os_version=None
  ):
      """Create dynamic library.
  
      Parameters
      ----------
      output : str
          The target shared library.
  
      objects : list
          List of object files.
  
      options : str
          The additional options.
  
      arch : str
          Target major architectures
  
      sdk : str
          The sdk to be used.
      """
      clang = xcrun(["-sdk", sdk, "-find", "clang"])
      sdk_path = xcrun(["-sdk", sdk, "--show-sdk-path"])
      cmd = [clang]
      cmd += ["-dynamiclib"]
      cmd += ["-arch", arch]
      cmd += ["-isysroot", sdk_path]
      cmd += [__get_min_os_version_cmd(sdk, min_os_version)]
      cmd += ["-o", output]
      if isinstance(objects, str):
          cmd += [objects]
      else:
          cmd += objects
  
      proc = subprocess.Popen(
          cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT
      )
      (out, _) = proc.communicate()
  
      if proc.returncode != 0:
          msg = "Compilation error:\n"
          msg += py_str(out)
          raise RuntimeError(msg)
  
file_path: tvm/python/tvm/contrib/xcode.py
imports: from __future__ import absolute_import
  import os
  import sys
  import subprocess
  import json
  from .._ffi.base import py_str
  from .None import utils
label_desc: Use image node_id 4 for calling a global function with example usage: create_dylib(output, objects, arch, sdk, min_os_version) without return types