aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-05-09 10:59:21 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-05-09 10:59:21 -0700
commitc24a513b16a6dc420f59b830bbe65b59ace9b48d (patch)
treed37c4d7d7ea5d50e643b52af39fb6e36546a2564
parent5e86eb0a834d9da5128e9fe9a6e24f94ec1cf0c1 (diff)
parentaf8773cf7c00665cd2b781fbd5a4977d4d830d08 (diff)
Merge pull request #1159 from juj/no_nacl_triple
Remove the __native_client__ system define when using NaCl triple.
-rw-r--r--tools/shared.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/shared.py b/tools/shared.py
index 5a9860db..0818f6b9 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: