summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2017-08-30 11:35:17 -0700
committerGitHub <noreply@github.com>2017-08-30 11:35:17 -0700
commit2f78c6492361f42496ea2a6af259c64c078ab083 (patch)
treeec9147563fb0704f4fba13c8a41aaa1cb38df4d5
parenta0517dbde4df692e041f4fa42036910b1846ea49 (diff)
downloadbinaryen-2f78c6492361f42496ea2a6af259c64c078ab083.tar.gz
binaryen-2f78c6492361f42496ea2a6af259c64c078ab083.tar.bz2
binaryen-2f78c6492361f42496ea2a6af259c64c078ab083.zip
Fix markdown block formatting in README.md (#1150)
-rw-r--r--README.md12
1 files changed, 6 insertions, 6 deletions
diff --git a/README.md b/README.md
index c67dc0179..892db6bdd 100644
--- a/README.md
+++ b/README.md
@@ -147,22 +147,22 @@ When using `emcc` with the `BINARYEN` option, it will use Binaryen to build to W
Binaryen's `s2wasm` tool can translate the `.s` output from the LLVM WebAssembly backend into WebAssembly. You can receive `.s` output from `llc`, and then run `s2wasm` on that:
-````
+```
llc code.ll -march=wasm32 -filetype=asm -o code.s
s2wasm code.s > code.wast
-````
+```
You can also use Emscripten, which will do those steps for you (as well as link to system libraries, etc.). You can use either normal Emscripten, including it's "fastcomp" fork of LLVM, or you can use "vanilla" LLVM, that is, pure upstream LLVM without Emscripten's additions. With Vanilla LLVM, you can build with
-````
+```
./emcc input.cpp -s BINARYEN=1
-````
+```
With normal Emscripten, you will need to tell it to use the WebAssembly backend, since its default is asm.js, by setting an env var,
-````
+```
EMCC_WASM_BACKEND=1 ./emcc input.cpp -s BINARYEN=1
-````
+```
(without the env var, the `BINARYEN` option will make it use the asm.js backend, then `asm2wasm`).