• Stars
    star
    455
  • Rank 96,175 (Top 2 %)
  • Language
    JavaScript
  • Created almost 12 years ago
  • Updated over 9 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

More Repositories

1

ammo.js

Direct port of the Bullet physics engine to JavaScript using Emscripten
C++
4,147
star
2

BananaBread

BananaBread is a C++ 3D game engine that runs on the web using JavaScript+WebGL+HTML
C++
1,375
star
3

box2d.js

Port of Box2D to JavaScript using Emscripten
C
1,316
star
4

speak.js

Text-to-Speech in JavaScript using eSpeak
C++
1,279
star
5

webgl-worker

JavaScript
231
star
6

xml.js

Port of libxml to JavaScript using Emscripten
JavaScript
174
star
7

zee.js

zlib compiled to JavaScript using Emscripten
C
97
star
8

j2k.js

Port of OpenJPEG, an open-source JPEG2000 codec, to JavaScript using Emscripten
C
82
star
9

intensityengine

[Not active!] An open source platform for 3D games and virtual worlds
C++
58
star
10

lzma.js

An LZMA implementation in JavaScript, compiled from lzip
C++
56
star
11

meandmyshadow.web

C
51
star
12

Massive

The asm.js benchmark
JavaScript
47
star
13

gmp.js

A port of the GNU Multiple-Precision Library (GMP), a library for arbitrary precision arithmetic, to JavaScript using Emscripten
C
44
star
14

mloc_emscripten_talk

JavaScript
41
star
15

clangor

clang ported to js
C++
41
star
16

worker-ui

Discussions and experiments with splitting UI rendering off the main thread on the web, using workers
34
star
17

boon

Freedoom + PrBoom: Open source Doom in HTML5
C++
33
star
18

Relooper

this repo is deprecated, see the binaryen repo
C++
21
star
19

build-suite

Pre-built WASM builds
JavaScript
19
star
20

bullet

C++
18
star
21

cashew

asm.js parser in C++
C++
18
star
22

syntensity

Experimental port of Sauerbraten/Syntensity to the web, using Emscripten
C++
17
star
23

talks

JavaScript
16
star
24

llvm-js

C++
16
star
25

clang-js

C++
14
star
26

cxx_demangle

C++ name demangling
JavaScript
14
star
27

misc-js-benchmarks

Miscellaneous JavaScript Benchmarks, of Dubious Value
JavaScript
13
star
28

emscripten-site

Emscripten website
HTML
11
star
29

demo-bananabread

BananaBread demo
JavaScript
10
star
30

musl-emscripten

C
10
star
31

binaryen-webpack-plugin

Binaryen plugin for webpack: shrinks wasm files
Python
8
star
32

webgl-2d-screen

JavaScript
7
star
33

embenchen

Emscripten benchmark suite
JavaScript
6
star
34

xz-lzma.js

C
3
star
35

simulations

Python
2
star
36

almond

C
2
star
37

tps_report_cloud_archiver

JavaScript
2
star
38

blog

SCSS
2
star
39

minir

C++
1
star
40

embooken

1
star
41

llvm-js-2

Trying to coax the Cpu0 backend to output JS
C++
1
star