aboutsummaryrefslogtreecommitdiff
path: root/emar
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-12-14 17:01:16 -0800
committerAlon Zakai <alonzakai@gmail.com>2011-12-14 17:01:16 -0800
commitdf41a405914e60d21262b3fb9ab81a5832bb4405 (patch)
treeda6c6aa4f3682cbbb7d0675fd48ac6510dbeeba3 /emar
parent8e7d56453f584c3be3b1aca0f642a94278afc466 (diff)
generate .o by default, not .bc. fixes test_zlib
Diffstat (limited to 'emar')
-rwxr-xr-xemar16
1 files changed, 12 insertions, 4 deletions
diff --git a/emar b/emar
index 65e106f9..5a627993 100755
--- a/emar
+++ b/emar
@@ -1,13 +1,21 @@
#!/usr/bin/env python
'''
-emcc - ar helper script
+emar - ar helper script
=======================
This script acts as a frontend replacement for ar. See emcc.
'''
-if set(sys.argv[1]).issubset(set('-cruqs')): # ar
- sys.argv = sys.argv[:1] + sys.argv[3:] + ['-o='+sys.argv[2]]
- assert use_linker, 'Linker should be used in this case'
+import os, sys
+from tools import shared
+
+DEBUG = os.environ.get('EMCC_DEBUG')
+
+newargs = [shared.EMLD] + sys.argv[3:] + ['-o='+sys.argv[2]]
+
+if DEBUG:
+ print >> sys.stderr, 'emar:', sys.argv, ' ==> ', newargs
+
+os.execvp(shared.EMLD, newargs)