aboutsummaryrefslogtreecommitdiff
path: root/tools/shared.py
diff options
context:
space:
mode:
authorJukka Jylänki <jujjyl@gmail.com>2013-01-13 17:07:44 +0200
committerJukka Jylänki <jujjyl@gmail.com>2013-01-13 17:07:44 +0200
commit24680787afc4bd68b7ffced11a440d42757b387e (patch)
tree00e9753ec4c500ee6387f384d012c9bf939d3923 /tools/shared.py
parentb40b122720de90d52948870e6a7bf9c4f851cca1 (diff)
Don't run Clang in MS compatibility mode on Windows (-fno-ms-compatibility). Fixes #762. Thanks to d0k in #llvm for the helpful insight!
Diffstat (limited to 'tools/shared.py')
-rw-r--r--tools/shared.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/shared.py b/tools/shared.py
index a78db8e0..f94bb263 100644
--- a/tools/shared.py
+++ b/tools/shared.py
@@ -344,10 +344,12 @@ try:
except:
COMPILER_OPTS = []
# 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.
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']
-
+ '-D__STDC__', '-Xclang', '-triple=i386-pc-linux-gnu', '-D__IEEE_LITTLE_ENDIAN', '-fno-math-errno',
+ '-fno-ms-compatibility']
USE_EMSDK = not os.environ.get('EMMAKEN_NO_SDK')