2011-12-14 23:12:19 +04:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
|
|
|
'''
|
2011-12-15 05:01:16 +04:00
|
|
|
emar - ar helper script
|
2011-12-14 23:12:19 +04:00
|
|
|
=======================
|
|
|
|
|
|
|
|
This script acts as a frontend replacement for ar. See emcc.
|
|
|
|
'''
|
|
|
|
|
2012-03-20 17:26:50 +04:00
|
|
|
import os, subprocess, sys
|
2011-12-15 05:01:16 +04:00
|
|
|
from tools import shared
|
|
|
|
|
|
|
|
DEBUG = os.environ.get('EMCC_DEBUG')
|
|
|
|
|
2012-02-08 02:05:22 +04:00
|
|
|
newargs = [shared.LLVM_AR] + sys.argv[1:]
|
2011-12-15 05:01:16 +04:00
|
|
|
|
|
|
|
if DEBUG:
|
|
|
|
print >> sys.stderr, 'emar:', sys.argv, ' ==> ', newargs
|
|
|
|
|
2011-12-17 09:55:39 +04:00
|
|
|
if len(newargs) > 2:
|
2012-03-20 17:26:50 +04:00
|
|
|
subprocess.call(newargs)
|
2011-12-14 23:12:19 +04:00
|
|
|
|