diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-06-24 16:00:24 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-07-03 15:31:02 -0700 |
commit | fac77c3ff04c2f228389fd3697239db263f62ab6 (patch) | |
tree | bd3529623087330da0ac84914c8601c8cd034198 /emlink.py | |
parent | fc397a94391958b13c06762957961f73447dabc9 (diff) |
initial setup
Diffstat (limited to 'emlink.py')
-rw-r--r-- | emlink.py | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/emlink.py b/emlink.py new file mode 100644 index 00000000..30fa675a --- /dev/null +++ b/emlink.py @@ -0,0 +1,27 @@ +#!/usr/bin/env python2 + +''' +Fast static linker for emscripten outputs. Specifically this links asm.js modules. + +Usage: emlink.py [main module] [side module] [output name] + + Main module should be built with -s MAIN_MODULE=1 + Side module should be built with -s SIDE_MODULE=1 + +Note that the output file can be used as a main module, so you can link multiple +side modules into a main module that way. +''' + +import os, subprocess, sys +from tools import shared + +try: + me, main, side, out = sys.argv[:4] +except: + print >> sys.stderr, 'usage: emlink.py [main module] [side module] [output name]' + sys.exit(1) + +print 'Main module:', main +print 'Side module:', side +print 'Output:', out + |