Index: lib/Basic/Targets.cpp =================================================================== --- lib/Basic/Targets.cpp +++ lib/Basic/Targets.cpp @@ -6585,6 +6585,17 @@ }; } // end anonymous namespace. +namespace { +// x86-32 Android target +class AndroidX86_32TargetInfo : public LinuxTargetInfo { +public: + AndroidX86_32TargetInfo(const llvm::Triple &Triple) + : LinuxTargetInfo(Triple) { + LongDoubleWidth = 64; + } +}; +} // end anonymous namespace + //===----------------------------------------------------------------------===// // Driver code @@ -6862,8 +6873,14 @@ return new DarwinI386TargetInfo(Triple); switch (os) { - case llvm::Triple::Linux: - return new LinuxTargetInfo(Triple); + case llvm::Triple::Linux: { + switch (Triple.getEnvironment()) { + default: + return new LinuxTargetInfo(Triple); + case llvm::Triple::Android: + return new AndroidX86_32TargetInfo(Triple); + } + } case llvm::Triple::DragonFly: return new DragonFlyBSDTargetInfo(Triple); case llvm::Triple::NetBSD: