Skip to content

kripken/llvm.js

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
December 27, 2012 23:30
December 28, 2012 22:50
January 2, 2013 10:57
December 27, 2012 23:30
December 27, 2012 23:30
December 29, 2012 11:33
December 31, 2012 12:37
December 31, 2012 12:37
December 27, 2012 23:30
December 27, 2012 23:30
December 27, 2012 23:30
December 27, 2012 23:30
December 27, 2012 23:30
December 27, 2012 23:30
December 25, 2012 08:48
December 31, 2012 12:37
January 1, 2013 15:39
December 27, 2012 23:30
December 27, 2012 23:30
December 27, 2012 23:30
December 27, 2012 23:30
December 27, 2012 23:30
December 25, 2012 22:25
December 25, 2012 22:25
December 25, 2012 22:25
December 25, 2012 22:25
December 27, 2012 23:30
December 27, 2012 23:30

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

About

LLVM compiled to JavaScript using Emscripten

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published