Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WASM: minimum toolchain #1249

Merged
merged 1 commit into from
Feb 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions cmake/toolchain/emcc.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
##==================================================================================================
## EVE - Expressive Vector Engine
## Copyright : EVE Contributors & Maintainers
## SPDX-License-Identifier: MIT
##
## emcmake cmake .. -G Ninja -DCMAKE_TOOLCHAIN_FILE='../cmake/toolchain/emcc.cmake'
##
##==================================================================================================
set(CMAKE_C_COMPILER emcc )
set(CMAKE_CXX_COMPILER em++ )

set(CMAKE_CXX_FLAGS "-DEVE_NO_FORCEINLINE ${EVE_OPTIONS}" )

set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)

set(ECMASCRIPT_ROOT get_filename_component(${CMAKE_CXX_COMPILER}))

set(CMAKE_FIND_ROOT_PATH "$ENV{EMSDK}/upstream/emscripten/cache/sysroot/")

set(CMAKE_CROSSCOMPILING_CMD ${PROJECT_SOURCE_DIR}/cmake/toolchain/run_wasm.sh )
8 changes: 8 additions & 0 deletions cmake/toolchain/run_wasm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
##==================================================================================================
## EVE - Expressive Vector Engine
## Copyright : EVE Contributors & Maintainers
## SPDX-License-Identifier: MIT
##==================================================================================================
#!/bin/sh

node $@
1 change: 1 addition & 0 deletions doc/dev/dev_cmake.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ generator.
| X86_avx512_no_native | cmake .. -G Ninja -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain/clang.x86.sde.cmake -DEVE_OPTIONS='-march=skylake-avx512' |
| Aarch64(arm-v8) | cmake .. -G Ninja -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain/gcc.aarch64.cmake |
| Arm (arm-v7) | cmake .. -G Ninja -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain/gcc.arm.cmake |
| wasm | emcmake cmake .. -G Ninja -DCMAKE_TOOLCHAIN_FILE='../cmake/toolchain/emcc.cmake' |

Once run, your build folder should contain all the necessary artifact to compile and run **EVE**
test suite.
Expand Down