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

Function check_binaryen

tools/building.py:1213–1226  ·  view source on GitHub ↗
(bindir)

Source from the content-addressed store, hash-verified

1211
1212
1213def check_binaryen(bindir):
1214 output = get_binaryen_version(bindir)
1215 if output:
1216 output = output.splitlines()[0]
1217 try:
1218 version = output.split()[2]
1219 version = int(version)
1220 except (IndexError, ValueError):
1221 exit_with_error(f'error parsing binaryen version ({output}). Please check your binaryen installation')
1222
1223 # Allow the expected version or the following one in order avoid needing to update both
1224 # emscripten and binaryen in lock step in emscripten-releases.
1225 if version not in {EXPECTED_BINARYEN_VERSION, EXPECTED_BINARYEN_VERSION + 1}:
1226 diagnostics.warning('version-check', 'unexpected binaryen version: %s (expected %s)', version, EXPECTED_BINARYEN_VERSION)
1227
1228
1229def get_binaryen_bin():

Callers 1

get_binaryen_binFunction · 0.85

Calls 4

get_binaryen_versionFunction · 0.85
exit_with_errorFunction · 0.85
splitMethod · 0.80
warningMethod · 0.80

Tested by

no test coverage detected