aboutsummaryrefslogtreecommitdiff
path: root/emcc
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-04-07 18:32:06 -0700
committerAlon Zakai <alonzakai@gmail.com>2012-04-07 18:32:06 -0700
commit7af9a2d81c1c3fe1711c1d6a9b702aaab44ef67a (patch)
treef27df73ddf72396fabe6a62b33d6f7d58316ae59 /emcc
parentd75b62654373185d8c71d608c83f18b6dcc9055b (diff)
improve fake precompiled header workaround in emcc
Diffstat (limited to 'emcc')
-rwxr-xr-xemcc5
1 files changed, 3 insertions, 2 deletions
diff --git a/emcc b/emcc
index 7b505244..2aea1d4f 100755
--- a/emcc
+++ b/emcc
@@ -378,8 +378,9 @@ for i in range(len(sys.argv)-1):
if header: # header or such
if len(sys.argv) >= 3: # if there is a source and a target, then copy, otherwise do nothing
- if DEBUG: print >> sys.stderr, 'Just copy.'
- shutil.copy(sys.argv[-1], sys.argv[-2])
+ sys.argv = filter(lambda arg: not arg.startswith('-I'), sys.argv)
+ if DEBUG: print >> sys.stderr, 'Just copy:', sys.argv[-1], target
+ shutil.copy(sys.argv[-1], target)
else:
if DEBUG: print >> sys.stderr, 'No-op.'
exit(0)