aboutsummaryrefslogtreecommitdiff
path: root/emcc
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-02-21 18:32:43 -0800
committerAlon Zakai <alonzakai@gmail.com>2013-02-21 18:32:43 -0800
commit941c8e583d603ff4e6b124dc1fe17d03dface233 (patch)
tree7c99d80fa861b4ab034cba4502d825b3e9add4da /emcc
parenta23490650c16c4e6b7639920aeeee2ce302a2b61 (diff)
parent21f7959f64db7f3309e7f9d0d106abb1ea82f403 (diff)
Merge pull request #859 from waywardmonkeys/cmdline-fixes
Cmdline fixes
Diffstat (limited to 'emcc')
-rwxr-xr-xemcc3
1 files changed, 2 insertions, 1 deletions
diff --git a/emcc b/emcc
index d28df40f..64c65d47 100755
--- a/emcc
+++ b/emcc
@@ -646,7 +646,8 @@ try:
for i in range(len(newargs)):
newargs[i] = newargs[i].strip() # On Windows Vista (and possibly others), excessive spaces in the command line leak into the items in this array, so trim e.g. 'foo.cpp ' -> 'foo.cpp'
if newargs[i].startswith('-O'):
- requested_level = newargs[i][2]
+ # Let -O default to -O2, which is what gcc does.
+ requested_level = newargs[i][2:] or '2'
if requested_level == 's':
print >> sys.stderr, 'emcc: warning: -Os is ignored (use -O0, -O1, -O2)'
else: