MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / generate_cmd

Function generate_cmd

tools/gen_struct_info.py:202–231  ·  view source on GitHub ↗
(js_file_path, src_file_path, cflags)

Source from the content-addressed store, hash-verified

200
201
202def generate_cmd(js_file_path, src_file_path, cflags):
203 # Compile the program.
204 show('Compiling generated code...')
205
206 if any('libcxxabi' in f for f in cflags):
207 compiler = shared.EMXX
208 else:
209 compiler = shared.EMCC
210
211 # -O1+ produces calls to iprintf, which libcompiler_rt doesn't support
212 cmd = [compiler, *cflags, '-o', js_file_path, src_file_path,
213 '-O0',
214 '-Werror',
215 '-Wno-format',
216 '-sBOOTSTRAPPING_STRUCT_INFO',
217 '-sWASM_ASYNC_COMPILATION=0',
218 '-sINCOMING_MODULE_JS_API=',
219 '-sSTRICT',
220 '-sSUPPORT_LONGJMP=0',
221 '-sASSERTIONS=0']
222
223 # Default behavior for emcc is to warn for binaryen version check mismatches
224 # so we should try to match that behavior.
225 cmd += ['-Wno-error=version-check']
226
227 # TODO(sbc): Remove this one we remove the test_em_config_env_var test
228 cmd += ['-Wno-deprecated']
229
230 show(shlex.join(cmd))
231 return cmd
232
233
234def inspect_headers(headers, cflags):

Callers 1

inspect_headersFunction · 0.85

Calls 2

showFunction · 0.70
joinMethod · 0.45

Tested by

no test coverage detected