(tool)
| 1502 | |
| 1503 | |
| 1504 | def 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 | |
| 1531 | def download_and_extract(archive, dest_dir, filename_prefix='', clobber=True): |
no test coverage detected