MCPcopy Create free account
hub / github.com/apache/tvm / create_shared

Function create_shared

python/tvm/support/cc.py:67–97  ·  view source on GitHub ↗

Create shared library. Parameters ---------- output : str The target shared library. objects : List[str] List of object files. options : List[str] The list of additional options string. cc : Optional[str] The compiler command. cwd : Op

(output, objects, options=None, cc=None, cwd=None, ccache_env=None)

Source from the content-addressed store, hash-verified

65
66
67def create_shared(output, objects, options=None, cc=None, cwd=None, ccache_env=None):
68 """Create shared library.
69
70 Parameters
71 ----------
72 output : str
73 The target shared library.
74
75 objects : List[str]
76 List of object files.
77
78 options : List[str]
79 The list of additional options string.
80
81 cc : Optional[str]
82 The compiler command.
83
84 cwd : Optional[str]
85 The current working directory.
86
87 ccache_env : Optional[Dict[str, str]]
88 The environment variable for ccache. Set `None` to disable ccache by default.
89 """
90 cc = cc or get_cc()
91
92 if _is_linux_like():
93 _linux_compile(output, objects, options, cc, cwd, ccache_env, compile_shared=True)
94 elif _is_windows_like():
95 _windows_compile(output, objects, options, cwd, ccache_env)
96 else:
97 raise ValueError("Unsupported platform")
98
99
100def _linux_ar(output, inputs, ar):

Callers

nothing calls this directly

Calls 5

get_ccFunction · 0.85
_is_linux_likeFunction · 0.85
_linux_compileFunction · 0.85
_is_windows_likeFunction · 0.85
_windows_compileFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…