MCPcopy Index your code
hub / github.com/emscripten-core/emsdk / build_binaryen_tool

Function build_binaryen_tool

emsdk.py:1504–1528  ·  view source on GitHub ↗
(tool)

Source from the content-addressed store, hash-verified

1502
1503
1504def build_binaryen_tool(tool):
1505 debug_print(f'build_binaryen_tool({tool})')
1506 src_root = tool.installation_path()
1507 build_root = binaryen_build_root(tool)
1508 build_type = decide_cmake_build_type(tool)
1509
1510 # Configure
1511 cmake_generator, args = get_generator_and_config_args(tool)
1512 args += ['-DENABLE_WERROR=0'] # -Werror is not useful for end users
1513 args += ['-DBUILD_TESTS=0'] # We don't want to build or run tests
1514
1515 if 'Visual Studio' in CMAKE_GENERATOR:
1516 if BUILD_FOR_TESTING:
1517 args += ['-DRUN_STATIC_ANALYZER=1']
1518
1519 success = cmake_configure_and_build(cmake_generator, build_root, src_root, build_type, args)
1520
1521 if success:
1522 # Deploy scripts needed from source repository to build directory
1523 remove_tree(os.path.join(build_root, 'scripts'))
1524 shutil.copytree(os.path.join(src_root, 'scripts'), os.path.join(build_root, 'scripts'))
1525 remove_tree(os.path.join(build_root, 'src', 'js'))
1526 shutil.copytree(os.path.join(src_root, 'src', 'js'), os.path.join(build_root, 'src', 'js'))
1527
1528 return success
1529
1530
1531def download_and_extract(archive, dest_dir, filename_prefix='', clobber=True):

Callers 1

install_toolMethod · 0.85

Calls 7

debug_printFunction · 0.85
binaryen_build_rootFunction · 0.85
decide_cmake_build_typeFunction · 0.85
remove_treeFunction · 0.85
installation_pathMethod · 0.80

Tested by

no test coverage detected