diff options
Diffstat (limited to 'tools/shared.py')
-rw-r--r-- | tools/shared.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/shared.py b/tools/shared.py index 5a9860db..228f1253 100644 --- a/tools/shared.py +++ b/tools/shared.py @@ -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: @@ -673,8 +676,10 @@ class Settings: Settings.EMIT_GENERATED_FUNCTIONS = 1 if opt_level >= 2: Settings.RELOOP = 1 + Settings.ALIASING_FUNCTION_POINTERS = 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.)') |