[PATCH] Align with new GCC options for x86 Android
Alexey Volkov
avolkov.intel at gmail.com
Wed Jun 25 05:23:50 PDT 2014
Closed by commit rL211688 (authored by volkalex).
REPOSITORY
rL LLVM
http://reviews.llvm.org/D4287
Files:
cfe/trunk/lib/Driver/Tools.cpp
cfe/trunk/test/Driver/clang-translation.c
Index: cfe/trunk/lib/Driver/Tools.cpp
===================================================================
--- cfe/trunk/lib/Driver/Tools.cpp
+++ cfe/trunk/lib/Driver/Tools.cpp
@@ -1426,9 +1426,13 @@
Features.push_back("-fsgsbase");
}
+ // Add features to comply with gcc on Android
if (Triple.getEnvironment() == llvm::Triple::Android) {
- // Add sse3 feature to comply with gcc on Android
- Features.push_back("+sse3");
+ if (Triple.getArch() == llvm::Triple::x86_64) {
+ Features.push_back("+sse4.2");
+ Features.push_back("+popcnt");
+ } else
+ Features.push_back("+ssse3");
}
// Now add any that the user explicitly requested on the command line,
Index: cfe/trunk/test/Driver/clang-translation.c
===================================================================
--- cfe/trunk/test/Driver/clang-translation.c
+++ cfe/trunk/test/Driver/clang-translation.c
@@ -211,14 +211,15 @@
// RUN: | FileCheck --check-prefix=ANDROID-X86 %s
// ANDROID-X86: clang
// ANDROID-X86: "-target-cpu" "i686"
-// ANDROID-X86: "-target-feature" "+sse3"
+// ANDROID-X86: "-target-feature" "+ssse3"
// RUN: %clang -target x86_64-linux-android -### -S %s 2>&1 \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: | FileCheck --check-prefix=ANDROID-X86_64 %s
// ANDROID-X86_64: clang
// ANDROID-X86_64: "-target-cpu" "x86-64"
-// ANDROID-X86_64: "-target-feature" "+sse3"
+// ANDROID-X86_64: "-target-feature" "+sse4.2"
+// ANDROID-X86_64: "-target-feature" "+popcnt"
// RUN: %clang -target mips-linux-gnu -### -S %s 2>&1 | \
// RUN: FileCheck -check-prefix=MIPS %s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4287.10828.patch
Type: text/x-patch
Size: 1631 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140625/6afef33d/attachment.bin>
More information about the cfe-commits
mailing list