diff options
Diffstat (limited to 'tools/shared.py')
-rw-r--r-- | tools/shared.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/shared.py b/tools/shared.py index 2bd219a9..cc056074 100644 --- a/tools/shared.py +++ b/tools/shared.py @@ -295,7 +295,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.4.2' +EMSCRIPTEN_VERSION = '1.4.3' def generate_sanity(): return EMSCRIPTEN_VERSION + '|' + get_llvm_target() @@ -495,7 +495,7 @@ except: # Target choice. Must be synced with src/settings.js (TARGET_*) def get_llvm_target(): - return os.environ.get('EMCC_LLVM_TARGET') or 'i386-pc-linux-gnu' # 'le32-unknown-nacl' + return os.environ.get('EMCC_LLVM_TARGET') or 'le32-unknown-nacl' # 'i386-pc-linux-gnu' LLVM_TARGET = get_llvm_target() try: @@ -509,6 +509,9 @@ COMPILER_OPTS = COMPILER_OPTS + ['-m32', '-U__i386__', '-U__i386', '-Ui386', '-D__IEEE_LITTLE_ENDIAN', '-fno-math-errno', '-fno-threadsafe-statics', '-target', LLVM_TARGET] +if LLVM_TARGET == 'le32-unknown-nacl': + COMPILER_OPTS += ['-U__native_client__', '-U__pnacl__', '-U__ELF__'] # The nacl target is originally used for Google Native Client. Emscripten is not NaCl, so remove the platform #define, when using their triple. + USE_EMSDK = not os.environ.get('EMMAKEN_NO_SDK') if USE_EMSDK: @@ -675,6 +678,7 @@ class Settings: Settings.RELOOP = 1 if opt_level >= 3: # Aside from these, -O3 also runs closure compiler and llvm lto + Settings.FORCE_ALIGNED_MEMORY = 1 Settings.DOUBLE_MODE = 0 Settings.PRECISE_I64_MATH = 0 if noisy: logging.warning('Applying some potentially unsafe optimizations! (Use -O2 if this fails.)') |