llvm.js

使用 Emscripten 将 LLVM 编译为 JavaScript。「LLVM compiled to JavaScript using Emscripten」

llvm.js

LLVM compiled to JavaScript using Emscripten

Generating the Bitcode

In a build directory under llvm root, run

emconfigure ../configure --enable-optimized --enable-targets=x86 --enable-libcpp --disable-jit --disable-threads --disable-pthreads
emmake make

You will hit errors on attempting to use tblgen and others, the build system is self-executing, but we generate bitcode that is unrunnable. When the errors happen, copy in the file from a parallel native build, and edit the Makefile of the parent dir (for llvm-tblgen, utils/, for llvm-config, tools/ and ./) that generates that file to not call it (otherwise, running make again will go back and overwrite the one you just copied in). Re-run make.

You may also hit errors on all-targets including Hexagon stuff, not sure why. To avoid that, edit the Makefiles and replace all-targets with x86 (specifically, in tools/opt, tools/llc. Note that these seem to be created/updated on the fly, as the later ones only show up after you fix earlier bugs, requiring multiple invocations of make.)

Then copy from the bin/ directory the relevant bitcode files to here, with suffix .bc

TODO: automate all preceding steps

Run doit.sh

概覽

名稱與所有者kripken/llvm.js
主編程語言JavaScript
編程語言JavaScript (語言數: 3)
平台
許可證
發布數0
創建於2012-12-23 22:16:37
推送於2015-03-03 00:22:18
最后一次提交2015-03-02 16:22:18
星數453
關注者數37
派生數36
提交數41
已啟用問題?
問題數6
打開的問題數6
拉請求數2
打開的拉請求數0
關閉的拉請求數1
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?
去到頂部