diff options
-rwxr-xr-x | emcc | 3 | ||||
-rw-r--r-- | tools/shared.py | 3 |
2 files changed, 5 insertions, 1 deletions
@@ -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: diff --git a/tools/shared.py b/tools/shared.py index 0282fbb1..7fc2b7c2 100644 --- a/tools/shared.py +++ b/tools/shared.py @@ -663,6 +663,9 @@ set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)''' % { 'winfix': '' if not WINDOWS e def make(args, stdout=None, stderr=None, env=None): if env is None: env = Building.get_building_env() + if not args: + print >> sys.stderr, 'Error: Executable to run not specified.' + sys.exit(1) #args += ['VERBOSE=1'] try: Popen(args, stdout=stdout, stderr=stderr, env=env).communicate() |