Index: source/Host/linux/Host.cpp =================================================================== --- source/Host/linux/Host.cpp +++ source/Host/linux/Host.cpp @@ -275,16 +275,22 @@ // GetModuleSpecifications() could fail if the executable has been deleted or is locked. // But it shouldn't return more than 1 architecture. assert(num_specs <= 1 && "Linux plugin supports only a single architecture"); - if (num_specs == 1) - { - ModuleSpec module_spec; - if (specs.GetModuleSpecAtIndex (0, module_spec) && module_spec.GetArchitecture().IsValid()) - { - process_info.GetArchitecture () = module_spec.GetArchitecture(); - return true; - } - } - return false; + if (num_specs != 1) + return false; + + ModuleSpec module_spec; + if (!specs.GetModuleSpecAtIndex (0, module_spec) && module_spec.GetArchitecture().IsValid()) + return false; + + process_info.GetArchitecture () = module_spec.GetArchitecture(); +#ifdef __ANDROID_NDK__ + auto &triple = process_info.GetArchitecture ().GetTriple(); + if (triple.getOS() == llvm::Triple::UnknownOS) + triple.setOS(llvm::Triple::Linux); + if (triple.getEnvironment() == llvm::Triple::UnknownEnvironment) + triple.setEnvironment(llvm::Triple::Android); +#endif + return true; } static bool