tree: b9bbcd01fc828dc11ccf9ff32bc95688f4fe496a [path history] [tgz]
  1. AllocaManager.cpp
  2. AllocaManager.h
  3. Binaryen.h
  4. Binaryen/
  5. BinaryenBackend.cpp
  6. BinaryenTargetMachine.cpp
  7. BinaryenTargetMachine.h
  8. BinaryenTargetTransformInfo.cpp
  9. BinaryenTargetTransformInfo.h
  10. CMakeLists.txt
  11. CallHandlers.h
  12. ExpandBigSwitches.cpp
  13. LLVMBuild.txt
  14. MCTargetDesc/
  15. Makefile
  16. OptPasses.h
  17. README.md
  18. RemoveLLVMAssume.cpp
  19. SimplifyAllocas.cpp
  20. TargetInfo/
lib/Target/BinaryenBackend/README.md

Binaryen Backend

This generates code by translating LLVM IR into Binaryen IR, then optimizing in Binaryen, and then emitting WebAssembly.

Building

From a subdirectory of the LLVM root (e.g. ./build), run

    cmake .. -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD="X86;JSBackend;BinaryenBackend" -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DCLANG_INCLUDE_EXAMPLES=OFF -DCLANG_INCLUDE_TESTS=OFF -DLLVM_ENABLE_ASSERTIONS=ON

You may want to remove assertions (the last command) for speed.

Then

    make