Skip to content

Commit

Permalink
cmake: Update wasm3 externalproject
Browse files Browse the repository at this point in the history
  • Loading branch information
axic committed Feb 22, 2021
1 parent 25205ab commit bc00683
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 126 deletions.
9 changes: 5 additions & 4 deletions cmake/ProjectWasm3.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,20 @@ set(wasm3_library ${binary_dir}/source/${CMAKE_STATIC_LIBRARY_PREFIX}m3${CMAKE_S
ExternalProject_Add(wasm3
EXCLUDE_FROM_ALL 1
PREFIX ${prefix}
DOWNLOAD_NAME wasm3-v0.4.7.tar.gz
DOWNLOAD_NAME wasm3-d339389d.tar.gz
DOWNLOAD_DIR ${prefix}/downloads
SOURCE_DIR ${source_dir}
BINARY_DIR ${binary_dir}
URL https://github.com/wasm3/wasm3/archive/v0.4.7.tar.gz
URL_HASH SHA256=11e863a643f605d62a5276e342abb01a65d33d138d01ea0070622a3f78fa1bd5
URL https://github.com/wasm3/wasm3/archive/dee9389d831a6ed5101155f31d217e47c4ad8175.tar.gz
URL_HASH SHA256=8ef1470884ecadad105e7e2bc37fb9cbf2242c87157201f02861874c8b419bbd
PATCH_COMMAND ${CMAKE_CURRENT_LIST_DIR}/apply_patches.sh
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_C_FLAGS="-Wno-sign-compare"
-DBUILD_WASI=none
-DBUILD_PORTABLE=ON
-DBUILD_NATIVE=OFF
INSTALL_COMMAND ""
BUILD_BYPRODUCTS ${wasm3_library}
)
Expand Down
76 changes: 0 additions & 76 deletions cmake/wasm3_01_extapi.patch

This file was deleted.

13 changes: 13 additions & 0 deletions cmake/wasm3_01_startfunc.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Should not need this patch. See details in issue https://github.com/wasm3/wasm3/issues/202

diff -burN wasm3.orig/source/m3_env.c wasm3/source/m3_env.c
--- wasm3.orig/source/m3_env.c 2021-02-22 23:29:50.000000000 +0000
+++ wasm3/source/m3_env.c 2021-02-22 23:29:19.000000000 +0000
@@ -695,6 +695,7 @@

// Start func might use imported functions, which are not liked here yet,
// so it will be called before a function call is attempted (in m3_FindFuSnction)
+_ (InitStartFunc (io_module));
}
else result = m3Err_moduleAlreadyLinked;

26 changes: 0 additions & 26 deletions cmake/wasm3_02_portable.patch

This file was deleted.

20 changes: 0 additions & 20 deletions cmake/wasm3_03_startfunc.patch

This file was deleted.

0 comments on commit bc00683

Please sign in to comment.