From fac77c3ff04c2f228389fd3697239db263f62ab6 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Mon, 24 Jun 2013 16:00:24 -0700 Subject: initial setup --- emlink.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 emlink.py (limited to 'emlink.py') 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 + -- cgit v1.2.3-18-g5258