[PATCH] Create android x86_32 target info

Chih-Hung Hsieh chh at google.com
Tue Mar 17 16:23:58 PDT 2015


For 64-bit mode, the long double size is correct but format is not compatible with current Android gcc configuration.
I am testing the following configuration, which seems to work with Android x86_64-eng target.

namespace {
// x86_64 Android target
class AndroidX86_64TargetInfo : public LinuxTargetInfo<X86_64TargetInfo> {
public:

  AndroidX86_64TargetInfo(const llvm::Triple &Triple)
      : LinuxTargetInfo<X86_64TargetInfo>(Triple) {
    LongDoubleFormat = &llvm::APFloat::IEEEquad;
  }

};
} // end anonymous namespace

....

case llvm::Triple::x86_64:

  if (Triple.isOSDarwin() || Triple.isOSBinFormatMachO())
    return new DarwinX86_64TargetInfo(Triple);
  
  switch (os) {
  case llvm::Triple::Linux:
    if (Triple.getEnvironment() == llvm::Triple::Android)
      return new AndroidX86_64TargetInfo(Triple);
    else
      return new LinuxTargetInfo<X86_64TargetInfo>(Triple);


http://reviews.llvm.org/D8357

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list