diff --git a/cmake/ProjectBinaryen.cmake b/cmake/ProjectBinaryen.cmake index fd84b0705..b10d3a2bd 100644 --- a/cmake/ProjectBinaryen.cmake +++ b/cmake/ProjectBinaryen.cmake @@ -44,6 +44,7 @@ ExternalProject_Add(binaryen BINARY_DIR ${binary_dir} URL https://github.com/WebAssembly/binaryen/archive/1.38.9.tar.gz URL_HASH SHA256=f8c6d4deb83dba8709c4df9f7983080ec0f9412e88899767ed2815b911ce1ebd + PATCH_COMMAND sh ${CMAKE_CURRENT_LIST_DIR}/patch_binaryen.sh CMAKE_ARGS -DCMAKE_INSTALL_PREFIX= -DCMAKE_BUILD_TYPE=Release diff --git a/cmake/patch_binaryen.sh b/cmake/patch_binaryen.sh new file mode 100644 index 000000000..9fd6e34b6 --- /dev/null +++ b/cmake/patch_binaryen.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +sed -iE 's/COMMAND python /COMMAND /' src/passes/CMakeLists.txt +sed -iE 's/\#\!/usr/bin/env python/#!/usr/bin/env python2/' scripts/embedwast.py