Index: lib/Analysis/ConstantFolding.cpp =================================================================== --- lib/Analysis/ConstantFolding.cpp +++ lib/Analysis/ConstantFolding.cpp @@ -37,6 +37,18 @@ #include #include +#if defined(__ANDROID_NDK__) +#include + +#if __ANDROID_API__ < 18 +// log2 is missing from API < 18 +double log2(double d) { return (double)__builtin_log2l(d); } +#else +#include +#endif + +#endif // defined(__ANDROID_NDK__) && defined(__i386__) + #ifdef HAVE_FENV_H #include #endif