Skip to content

Commit

Permalink
push
Browse files Browse the repository at this point in the history
  • Loading branch information
victoryang00 committed Oct 26, 2023
1 parent 14ecab1 commit 36e4620
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 25 deletions.
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[submodule "lib/wasm-micro-runtime"]
path = lib/wasm-micro-runtime
url = https://github.com/Multi-V-VM/wasm-micro-runtime/
url = https://github.com/Multi-V-VM/wasm-micro-runtime.git
[submodule "lib/yalantinglibs"]
path = lib/yalantinglibs
url = https://github.com/alibaba/yalantinglibs
url = https://github.com/alibaba/yalantinglibs.git
[submodule "bench/gapbs"]
path = bench/gapbs
url = https://github.com/victoryang00/gapbs.git
Expand All @@ -12,4 +12,4 @@
url = https://github.com/victoryang00/ClickHouse.git
[submodule "bench/llama"]
path = bench/llama
url = https://github.com/second-state/WasmEdge-WASINN-examples
url = https://github.com/victoryang00/llamma-wamr.git
45 changes: 24 additions & 21 deletions bench/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
add_executable(mvvm_benchmark bench.cpp)
target_link_libraries(mvvm_benchmark benchmark::benchmark)
add_executable(MVVM_benchmark bench.cpp)
target_link_libraries(MVVM_benchmark benchmark::benchmark)

if(WIN32)
set(WASI_SDK_DIR D:/wasi-sdk/)
set(EMSDK_DIR D:/emsdk/)
set(WASI_SDK "D:/wasi-sdk")
set(EMSDK_DIR "D:/emsdk/upstream")
set(WASI_EXE_POSTFIX ".exe")
else()
set(WASI_SDK_DIR /opt/wasi-sdk/)
set(EMSDK_DIR /opt/emsdk/)
set(WASI_SDK "/opt/wasi-sdk")
set(EMSDK_DIR "/opt/emsdk/upstream")
set(WASI_EXE_POSTFIX "")
endif()

include(ExternalProject)

ExternalProject_Add(gapbs
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/gapbs
UPDATE_COMMAND ""
PATCH_COMMAND ""
CONFIGURE_COMMAND ${CMAKE_COMMAND}
-DCMAKE_C_COMPILER_WORKS=1 -DCMAKE_CXX_COMPILER_WORKS=1
-GNinja
-DWASI_SDK_DIR=${WASI_SDK_DIR}
-DCMAKE_TOOLCHAIN_FILE=${WASI_SDK_DIR}/share/cmake/wasi-sdk.cmake
-DCMAKE_SYSROOT=${WASI_SDK_DIR}/share/wasi-sysroot
-GUnix\ Makefiles -DWASI_SDK_DIR=${WASI_SDK}
-DCMAKE_C_COMPILER=${WASI_SDK}/bin/clang${WASI_EXE_POSTFIX}
-DCMAKE_CXX_COMPILER=${WASI_SDK}/bin/clang++${WASI_EXE_POSTFIX}
-DCMAKE_TOOLCHAIN_FILE=${WASI_SDK}/share/cmake/wasi-sdk.cmake
-DCMAKE_SYSROOT=${WASI_SDK}/share/wasi-sysroot
${CMAKE_CURRENT_SOURCE_DIR}/gapbs
BUILD_COMMAND ${CMAKE_COMMAND} --build .
)
Expand All @@ -28,11 +32,10 @@ SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/clickhouse
UPDATE_COMMAND ""
PATCH_COMMAND ""
CONFIGURE_COMMAND ${CMAKE_COMMAND}
-DCMAKE_C_COMPILER_WORKS=1 -DCMAKE_CXX_COMPILER_WORKS=1
-GNinja
-DWASI_SDK_DIR=${WASI_SDK_DIR}
-DCMAKE_TOOLCHAIN_FILE=${EMSDK_DIR}/share/cmake/wasi-sdk.cmake
-DCMAKE_SYSROOT=${WASI_SDK_DIR}/share/wasi-sysroot -DEM
-GUnix\ Makefiles
-DCMAKE_C_COMPILER=${EMSDK_DIR}/bin/clang${WASI_EXE_POSTFIX}
-DCMAKE_CXX_COMPILER=${EMSDK_DIR}/bin/clang++${WASI_EXE_POSTFIX}
-DCMAKE_SYSROOT=${EMSDK_DIR}/emscripten/cache/sysroot -DEMSCRIPTEN=1
${CMAKE_CURRENT_SOURCE_DIR}/clickhouse
BUILD_COMMAND ${CMAKE_COMMAND} --build .
)
Expand All @@ -42,11 +45,11 @@ ExternalProject_Add(llama
UPDATE_COMMAND ""
PATCH_COMMAND ""
CONFIGURE_COMMAND ${CMAKE_COMMAND}
-DCMAKE_C_COMPILER_WORKS=1 -DCMAKE_CXX_COMPILER_WORKS=1
-GNinja
-DWASI_SDK_DIR=${WASI_SDK_DIR}
-DCMAKE_TOOLCHAIN_FILE=${WASI_SDK_DIR}/share/cmake/wasi-sdk.cmake
-DCMAKE_SYSROOT=${WASI_SDK_DIR}/share/wasi-sysroot
-GUnix\ Makefiles -DWASI_SDK_DIR=${WASI_SDK}
-DCMAKE_C_COMPILER=${WASI_SDK}/bin/clang${WASI_EXE_POSTFIX}
-DCMAKE_CXX_COMPILER=${WASI_SDK}/bin/clang++${WASI_EXE_POSTFIX}
-DCMAKE_TOOLCHAIN_FILE=${WASI_SDK}/share/cmake/wasi-sdk.cmake
-DCMAKE_SYSROOT=${WASI_SDK}/share/wasi-sysroot
${CMAKE_CURRENT_SOURCE_DIR}/llama
BUILD_COMMAND ${CMAKE_COMMAND} --build .
)
2 changes: 1 addition & 1 deletion bench/gapbs
Submodule gapbs updated from 62258d to 9b657e

0 comments on commit 36e4620

Please sign in to comment.