aboutsummaryrefslogtreecommitdiff
path: root/emcc
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-05-31 11:59:42 -0700
committerAlon Zakai <alonzakai@gmail.com>2012-05-31 11:59:42 -0700
commitb0b7cee27fdb2f8cf75a7355fd880e08e155387c (patch)
treec547dedd70d9829a8808564a7703a0b1e0630175 /emcc
parent695e06078d78489d731306b713baebdc91e5f695 (diff)
treat -s not before OPT=VALUE as a linker option
Diffstat (limited to 'emcc')
-rwxr-xr-xemcc8
1 files changed, 5 insertions, 3 deletions
diff --git a/emcc b/emcc
index 7db1ca3b..6471f8f3 100755
--- a/emcc
+++ b/emcc
@@ -548,9 +548,11 @@ try:
settings_changes = []
for i in range(len(newargs)):
if newargs[i] == '-s':
- assert '=' in newargs[i+1], 'Incorrect syntax for -s (use -s OPT=VAL): ' + newargs[i+1]
- settings_changes.append(newargs[i+1])
- newargs[i] = newargs[i+1] = ''
+ if i+1 < len(newargs) and '=' in newargs[i+1]: # -s OPT=VALUE is for us, -s by itself is a linker option
+ settings_changes.append(newargs[i+1])
+ newargs[i] = newargs[i+1] = ''
+ else:
+ print >> sys.stderr, 'emcc: warning: treating -s as linker option and not as -s OPT=VALUE for js compilation'
elif newargs[i].startswith('--typed-arrays'):
assert '=' not in newargs[i], 'Invalid typed arrays parameter (do not use "=")'
settings_changes.append('USE_TYPED_ARRAYS=' + newargs[i+1])