aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-05-28 04:29:55 -0700
committerAlon Zakai <alonzakai@gmail.com>2012-05-28 04:29:55 -0700
commita35749dcc1447022a0965c12766a023cfec46ab6 (patch)
treeb5f7e7f33256724deaa1d2abf0520848735bc1b8
parent93192892a18efd70567809bc08e4d2a15635cc0e (diff)
remove emld, we no longer use llvm-ld which is deprecated
-rwxr-xr-xemld60
1 files changed, 0 insertions, 60 deletions
diff --git a/emld b/emld
deleted file mode 100755
index 695be784..00000000
--- a/emld
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/usr/bin/env python
-
-'''
-emld - linker helper script
-===========================
-
-This script acts as a frontend replacement for the ld linker. See emcc.
-
-We could use the compiler code for this, but here we want to be careful to use all the linker flags we have been passed, sending them to ld.
-'''
-
-import os, subprocess, sys
-from tools import shared
-
-DEBUG = os.environ.get('EMCC_DEBUG')
-
-if DEBUG:
- print >> sys.stderr, 'emld:', sys.argv
-
-ALLOWED_LINK_ARGS = ['-f', '-help', '-o', '-print-after', '-print-after-all', '-print-before',
- '-print-before-all', '-time-passes', '-v', '-verify-dom-info', '-version' ]
-TWO_PART_DISALLOWED_LINK_ARGS = ['-L'] # Ignore thingsl like |-L .|
-
-# Check for specified target
-target = None
-for i in range(len(sys.argv)-1):
- if sys.argv[i].startswith('-o='):
- raise Exception('Invalid syntax: do not use -o=X, use -o X')
-
- if sys.argv[i] == '-o':
- target = sys.argv[i+1]
- sys.argv = sys.argv[:i] + sys.argv[i+2:]
- break
-
-call = shared.LLVM_LD
-newargs = ['-disable-opt']
-i = 0
-while i < len(sys.argv)-1:
- i += 1
- arg = sys.argv[i]
- if arg.startswith('-'):
- prefix = arg.split('=')[0]
- if prefix in ALLOWED_LINK_ARGS:
- newargs.append(arg)
- if arg in TWO_PART_DISALLOWED_LINK_ARGS:
- i += 1
- elif arg.endswith('.so'):
- continue # .so's do not exist yet, in many cases
- else:
- # not option, so just append
- newargs.append(arg)
-if target:
- actual_target = target
- if target.endswith('.js'):
- actual_target = unsuffixed(target) + '.bc'
- newargs.append('-o=' + actual_target)
-
-if DEBUG: print >> sys.stderr, "emld running:", call, ' '.join(newargs)
-subprocess.call([call] + newargs)
-