~ubuntu-branches/ubuntu/vivid/emscripten/vivid

« back to all changes in this revision

Viewing changes to .pc/pythonpath.diff/emlink.py

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2013-09-20 22:44:35 UTC
  • mfrom: (4.1.1 sid)
  • Revision ID: package-import@ubuntu.com-20130920224435-apuwj4fsl3fqv1a6
Tags: 1.5.6~20130920~6010666-1
* New snapshot release
* Update the list of supported architectures to the same as libv8
  (Closes: #723129)
* emlibtool has been removed from upstream.
* Fix warning syntax-error-in-dep5-copyright
* Refresh of the patches

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env python2
 
2
 
 
3
'''
 
4
Fast static linker for emscripten outputs. Specifically this links asm.js modules.
 
5
 
 
6
See https://github.com/kripken/emscripten/wiki/Linking
 
7
'''
 
8
 
 
9
import sys
 
10
from tools import shared
 
11
from tools.asm_module import AsmModule
 
12
 
 
13
try:
 
14
  me, main, side, out = sys.argv[:4]
 
15
except:
 
16
  print >> sys.stderr, 'usage: emlink.py [main module] [side module] [output name]'
 
17
  sys.exit(1)
 
18
 
 
19
print 'Main module:', main
 
20
print 'Side module:', side
 
21
print 'Output:', out
 
22
 
 
23
shared.try_delete(out)
 
24
 
 
25
main = AsmModule(main)
 
26
side = AsmModule(side)
 
27
 
 
28
side.relocate_into(main)
 
29
main.write(out)
 
30