diff options
author | WenHan Gu <Wenhan.gu@mediatek.com> | 2013-11-05 23:39:32 +0800 |
---|---|---|
committer | Andrew Hsieh <andrewhsieh@google.com> | 2015-03-24 11:53:32 -0700 |
commit | 3722003fb74fdd7e2f8bddeec33af3b6ae1e6e91 (patch) | |
tree | 4b01977e85bfc3ff81eb6f823baf52dd909b35eb | |
parent | b385e06ccd2b2e58f9af0c443379b1dc03df450d (diff) | |
download | llvm-3722003fb74fdd7e2f8bddeec33af3b6ae1e6e91.tar.gz |
[ndk][arm] Conditional compile fenv.h for NDK headers.
NDK armeabi default use -msoft-float, and it cannot truely use
fenv.h since it has vmrs,vmsr inline asm.
Change-Id: If49045f2bfed0f33f7dc9156d5eea3bda89ad90a
-rw-r--r-- | lib/Analysis/ConstantFolding.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Analysis/ConstantFolding.cpp b/lib/Analysis/ConstantFolding.cpp index fd8f2aee2db..2f8196ef864 100644 --- a/lib/Analysis/ConstantFolding.cpp +++ b/lib/Analysis/ConstantFolding.cpp @@ -37,6 +37,11 @@ #include <cerrno> #include <cmath> +// NDK fenv.h implementation has vmrs, vmsr that -msoft-float cannot compile. +#if defined(__ANDROID__) && defined(__arm__) && defined(__SOFTFP__) +#undef HAVE_FENV_H +#endif + #ifdef HAVE_FENV_H #include <fenv.h> #endif |