Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Merge pull request #86 from elmato/update-readme-wasm-toolchain
Browse files Browse the repository at this point in the history
Instructions to perform a full build with the WASM toolchain
  • Loading branch information
bytemaster authored Jul 18, 2017
2 parents 1328af5 + d187837 commit 3c11862
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,26 @@ Done
By default LLVM and clang do not include the WASM build target, so you will have to build it yourself. Note that following these instructions will create a version of LLVM that can only build WASM targets.

```
git clone --depth 1 --single-branch --branch release_40 [email protected]:llvm-mirror/llvm.git
mkdir ~/wasm-compiler
cd ~/wasm-compiler
git clone --depth 1 --single-branch --branch release_40 https://github.com/llvm-mirror/llvm.git
cd llvm/tools
git clone --depth 1 --single-branch --branch release_40 [email protected]:llvm-mirror/clang.git
git clone --depth 1 --single-branch --branch release_40 https://github.com/llvm-mirror/clang.git
cd ..
mkdir build
cd build
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=.. -DLLVM_TARGETS_TO_BUILD= -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly -DCMAKE_BUILD_TYPE=Release ../
make -j4 install
```

### Using the WASM compiler to perform a full build of the project

The WASM_LLVM_CONFIG environment variable is used to find our recently built WASM compiler.
This is needed to compile the example contracts insde eos/contracts folder and their respective tests.

```
git clone https://github.com/eosio/eos --recursive
mkdir -p eos/build && cd eos/build
WASM_LLVM_CONFIG=~/wasm-compiler/llvm/bin/llvm-config cmake ..
make -j4
```

0 comments on commit 3c11862

Please sign in to comment.