diff options
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r-- | lib/Driver/Tools.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 0af7949a6e..1038f58667 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -1341,10 +1341,17 @@ void Clang::AddX86TargetArgs(const ArgList &Args, // attributes here. llvm::StringMap<unsigned> PrevFeature; std::vector<const char*> Features; + // Add features to comply with gcc on Android if (getToolChain().getTriple().getEnvironment() == llvm::Triple::Android) { - // Add -msse3 - PrevFeature["sse3"] = Features.size() + 1; - Features.push_back("+sse3"); + if (getToolChain().getTriple().getArch() == llvm::Triple::x86_64) { + PrevFeature["sse4.2"] = Features.size() + 1; + Features.push_back("+sse4.2"); + PrevFeature["popcnt"] = Features.size() + 1; + Features.push_back("+popcnt"); + } else { + PrevFeature["ssse3"] = Features.size() + 1; + Features.push_back("+ssse3"); + } } for (arg_iterator it = Args.filtered_begin(options::OPT_m_x86_Features_Group), ie = Args.filtered_end(); it != ie; ++it) { |