emscripten: update binaryen patches

This commit is contained in:
Jia Yuan Lo 2022-03-27 20:21:06 +08:00 committed by xtkoba
parent 24f4f6c0b9
commit 00960ad67c
3 changed files with 10 additions and 35 deletions

View File

@ -1,15 +0,0 @@
diff -uNr binaryen/CMakeLists.txt binaryen.mod/CMakeLists.txt
--- binaryen/CMakeLists.txt 2022-02-26 23:46:13.824326901 +0800
+++ binaryen.mod/CMakeLists.txt 2022-02-27 00:20:59.532106415 +0800
@@ -317,7 +317,10 @@
add_subdirectory(test/lit)
# Configure GTest unit tests
-add_subdirectory(test/gtest)
+option(ENABLE_GTEST "Enable GTest unit tests" ON)
+if(ENABLE_GTEST)
+ add_subdirectory(test/gtest)
+endif()
# Object files
set(binaryen_objs

View File

@ -1,28 +1,18 @@
diff -uNr binaryen/third_party/CMakeLists.txt binaryen.mod/third_party/CMakeLists.txt
--- binaryen/third_party/CMakeLists.txt 2022-02-26 23:46:14.268336047 +0800
+++ binaryen.mod/third_party/CMakeLists.txt 2022-02-27 00:30:42.657030709 +0800
@@ -2,15 +2,14 @@
add_subdirectory(llvm-project)
endif()
-include_directories(
- googletest/googletest
- googletest/googletest/include
-)
+if(ENABLE_GTEST)
+ include_directories(
+ googletest/googletest
+ googletest/googletest/include)
--- binaryen/third_party/CMakeLists.txt 2022-03-31 22:51:24.112121827 +0800
+++ binaryen.mod/third_party/CMakeLists.txt 2022-03-31 22:55:16.326587396 +0800
@@ -7,10 +7,7 @@
googletest/googletest/include
)
-add_library(gtest STATIC
- googletest/googletest/src/gtest-all.cc
-)
+ add_library(gtest STATIC
+ googletest/googletest/src/gtest-all.cc)
-
-add_library(gtest_main STATIC
- googletest/googletest/src/gtest_main.cc
-)
+ add_library(gtest_main STATIC
+ googletest/googletest/src/gtest_main.cc)
+if(BUILD_TESTS)
+ add_library(gtest STATIC googletest/googletest/src/gtest-all.cc)
+ add_library(gtest_main STATIC googletest/googletest/src/gtest_main.cc)
+endif()

View File

@ -111,7 +111,7 @@ LLVM_BUILD_ARGS="
# https://github.com/WebAssembly/binaryen/blob/main/CMakeLists.txt
BINARYEN_BUILD_ARGS="
-DCMAKE_INSTALL_PREFIX=$TERMUX_PREFIX/opt/emscripten-binaryen
-DENABLE_GTEST=OFF
-DBUILD_TESTS=OFF
"
termux_step_post_get_source() {