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

Function create_executable

python/tvm/support/cc.py:148–178  ·  view source on GitHub ↗

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

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

Source from the content-addressed store, hash-verified

146
147
148def create_executable(output, objects, options=None, cc=None, cwd=None, ccache_env=None):
149 """Create executable binary.
150
151 Parameters
152 ----------
153 output : str
154 The target executable.
155
156 objects : List[str]
157 List of object files.
158
159 options : List[str]
160 The list of additional options string.
161
162 cc : Optional[str]
163 The compiler command.
164
165 cwd : Optional[str]
166 The urrent working directory.
167
168 ccache_env : Optional[Dict[str, str]]
169 The environment variable for ccache. Set `None` to disable ccache by default.
170 """
171 cc = cc or get_cc()
172
173 if _is_linux_like():
174 _linux_compile(output, objects, options, cc, cwd, ccache_env)
175 elif _is_windows_like():
176 _windows_compile(output, objects, options, cwd, ccache_env)
177 else:
178 raise ValueError("Unsupported platform")
179
180
181def get_global_symbol_section_map(path, *, nm=None) -> dict[str, str]:

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…