aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Volkov <alexey.v.volkov@intel.com>2014-06-25 17:27:28 +0400
committerAlexey Volkov <alexey.v.volkov@intel.com>2014-06-25 17:27:28 +0400
commit605eefd99fed56bcb7dec02f2776908b1df91646 (patch)
treea0e765f98556c2deddd37f0dda9bc9aae70828a8
parent260f965f1273cd0aa8a1270885519df8e6317062 (diff)
downloadclang-release_33.tar.gz
Align with new GCC options for x86 Androidrelease_33
These changes are based on revision 211688 from clang 3.5 Change-Id: I15b0f17ea4024f486d033be27eddf45cde85abd0 Signed-off-by: Alexey Volkov <alexey.v.volkov@intel.com>
-rw-r--r--lib/Driver/Tools.cpp13
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) {