aboutsummaryrefslogtreecommitdiff
path: root/tools/shared.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-03-03 14:41:24 -0800
committerAlon Zakai <alonzakai@gmail.com>2014-03-03 15:38:42 -0800
commit7f45922c7ffa3c8591344b2851373c70a4bf05ae (patch)
treefefbc76acde8988acb71a9a3911da1532ab11bad /tools/shared.py
parentbc921f43a57650c50f609b14e19f54c3d2f32cc5 (diff)
enable errors on implicit functions by default; fixes #2175
Diffstat (limited to 'tools/shared.py')
-rw-r--r--tools/shared.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/shared.py b/tools/shared.py
index 31f0aad9..533906c9 100644
--- a/tools/shared.py
+++ b/tools/shared.py
@@ -662,6 +662,15 @@ if LLVM_TARGET != 'asmjs-unknown-emscripten':
COMPILER_OPTS += ['-DEMSCRIPTEN', '-D__EMSCRIPTEN__', '-fno-math-errno',
'-U__native_client__', '-U__pnacl__', '-U__ELF__']
+# Changes to default clang behavior
+if LLVM_TARGET == 'asmjs-unknown-emscripten' or LLVM_TARGET == 'le32-unknown-nacl':
+ # Implicit functions can cause horribly confusing asm.js function pointer type errors, see #2175
+ # If your codebase really needs them - very unrecommended! - you can disable the error with
+ # -Wno-error=implicit-function-declaration
+ # or disable even a warning about it with
+ # -Wno-implicit-function-declaration
+ COMPILER_OPTS += ['-Werror=implicit-function-declaration']
+
USE_EMSDK = not os.environ.get('EMMAKEN_NO_SDK')
if USE_EMSDK: