diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/js_optimizer.py | 4 | ||||
-rw-r--r-- | tools/shared.py | 24 |
2 files changed, 19 insertions, 9 deletions
diff --git a/tools/js_optimizer.py b/tools/js_optimizer.py index 1f1c1354..b11d0449 100644 --- a/tools/js_optimizer.py +++ b/tools/js_optimizer.py @@ -34,7 +34,7 @@ class Minifier: # Create list of valid short names - MAX_NAMES = 60000 + MAX_NAMES = 80000 INVALID_2 = set(['do', 'if', 'in']) INVALID_3 = set(['for', 'new', 'try', 'var', 'env']) @@ -100,7 +100,7 @@ def run_on_chunk(command): f = open(filename, 'w') f.write(output) f.close() - if DEBUG: print >> sys.stderr, '.' + if DEBUG and not shared.WINDOWS: print >> sys.stderr, '.' # Skip debug progress indicator on Windows, since it doesn't buffer well with multiple threads printing to console. return filename def run_on_js(filename, passes, js_engine, jcache): diff --git a/tools/shared.py b/tools/shared.py index 55224ebb..a13c20a6 100644 --- a/tools/shared.py +++ b/tools/shared.py @@ -7,6 +7,9 @@ def listify(x): if type(x) is not list: return [x] return x +# Temp file utilities +from tempfiles import try_delete + # On Windows python suffers from a particularly nasty bug if python is spawning new processes while python itself is spawned from some other non-console process. # Use a custom replacement for Popen on Windows to avoid the "WindowsError: [Error 6] The handle is invalid" errors when emcc is driven through cmake or mingw32-make. # See http://bugs.python.org/issue3905 @@ -181,7 +184,7 @@ def check_node_version(): # we re-check sanity when the settings are changed) # We also re-check sanity and clear the cache when the version changes -EMSCRIPTEN_VERSION = '1.3.5' +EMSCRIPTEN_VERSION = '1.3.6' def check_sanity(force=False): try: @@ -254,6 +257,7 @@ def check_sanity(force=False): # Tools/paths LLVM_ADD_VERSION = os.getenv('LLVM_ADD_VERSION') +CLANG_ADD_VERSION = os.getenv('CLANG_ADD_VERSION') # Some distributions ship with multiple llvm versions so they add # the version to the binaries, cope with that @@ -263,8 +267,16 @@ def build_llvm_tool_path(tool): else: return os.path.join(LLVM_ROOT, tool) -CLANG_CC=os.path.expanduser(os.path.join(LLVM_ROOT, 'clang')) -CLANG_CPP=os.path.expanduser(os.path.join(LLVM_ROOT, 'clang++')) +# Some distributions ship with multiple clang versions so they add +# the version to the binaries, cope with that +def build_clang_tool_path(tool): + if CLANG_ADD_VERSION: + return os.path.join(LLVM_ROOT, tool + "-" + CLANG_ADD_VERSION) + else: + return os.path.join(LLVM_ROOT, tool) + +CLANG_CC=os.path.expanduser(build_clang_tool_path('clang')) +CLANG_CPP=os.path.expanduser(build_clang_tool_path('clang++')) CLANG=CLANG_CPP LLVM_LINK=build_llvm_tool_path('llvm-link') LLVM_AR=build_llvm_tool_path('llvm-ar') @@ -374,10 +386,11 @@ except: # Force a simple, standard target as much as possible: target 32-bit linux, and disable various flags that hint at other platforms # -fno-ms-compatibility is passed, since on Windows, Clang enables a 'MS compatibility mode' by default, that disables char16_t and char32_t # to be MSVC header -compatible. This would cause build errors in libcxx file __config. +# -fno-delayed-template-parsing is needed on Windows due to http://llvm.org/PR15651 COMPILER_OPTS = COMPILER_OPTS + ['-m32', '-U__i386__', '-U__x86_64__', '-U__i386', '-U__x86_64', '-Ui386', '-Ux86_64', '-U__SSE__', '-U__SSE2__', '-U__MMX__', '-UX87_DOUBLE_ROUNDING', '-UHAVE_GCC_ASM_FOR_X87', '-DEMSCRIPTEN', '-U__STRICT_ANSI__', '-U__CYGWIN__', '-D__STDC__', '-Xclang', '-triple=i386-pc-linux-gnu', '-D__IEEE_LITTLE_ENDIAN', '-fno-math-errno', - '-fno-ms-compatibility'] + '-fno-ms-compatibility', '-fno-delayed-template-parsing'] USE_EMSDK = not os.environ.get('EMMAKEN_NO_SDK') @@ -426,9 +439,6 @@ if not WINDOWS: except: pass -# Temp file utilities -from tempfiles import try_delete - # Utilities def check_engine(engine): |