[PATCH] D110379: [Driver] Remove confusing *-linux-android detection with non-android --target=
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 23 20:37:31 PDT 2021
MaskRay created this revision.
MaskRay added reviewers: pirama, srhines.
Herald added subscribers: danielkiss, kristof.beyls.
MaskRay requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
These values allow, for example, `--target=aarch64` and
`--target=aarch64-linux-gnu` to detect `aarch64-linux-android`. This is
confusing. Users should specify `--target=aarch64-linux-gnu` to get Android GCC
installation.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D110379
Files:
clang/lib/Driver/ToolChains/Gnu.cpp
clang/test/Driver/android-gcc-toolchain.c
Index: clang/test/Driver/android-gcc-toolchain.c
===================================================================
--- clang/test/Driver/android-gcc-toolchain.c
+++ clang/test/Driver/android-gcc-toolchain.c
@@ -1,7 +1,7 @@
// Test that gcc-toolchain option works correctly with a aarch64-linux-gnu
// triple.
//
-// RUN: %clang %s -### -v --target=aarch64-linux-gnu \
+// RUN: %clang %s -### -v --target=aarch64-linux-android \
// RUN: --gcc-toolchain=%S/Inputs/basic_android_ndk_tree/ 2>&1 \
// RUN: | FileCheck %s
//
Index: clang/lib/Driver/ToolChains/Gnu.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Gnu.cpp
+++ clang/lib/Driver/ToolChains/Gnu.cpp
@@ -2084,21 +2084,19 @@
static const char *const AArch64LibDirs[] = {"/lib64", "/lib"};
static const char *const AArch64Triples[] = {
"aarch64-none-linux-gnu", "aarch64-linux-gnu", "aarch64-redhat-linux",
- "aarch64-suse-linux", "aarch64-linux-android"};
+ "aarch64-suse-linux"};
static const char *const AArch64beLibDirs[] = {"/lib"};
static const char *const AArch64beTriples[] = {"aarch64_be-none-linux-gnu",
"aarch64_be-linux-gnu"};
static const char *const ARMLibDirs[] = {"/lib"};
- static const char *const ARMTriples[] = {"arm-linux-gnueabi",
- "arm-linux-androideabi"};
+ static const char *const ARMTriples[] = {"arm-linux-gnueabi"};
static const char *const ARMHFTriples[] = {"arm-linux-gnueabihf",
"armv7hl-redhat-linux-gnueabi",
"armv6hl-suse-linux-gnueabi",
"armv7hl-suse-linux-gnueabi"};
static const char *const ARMebLibDirs[] = {"/lib"};
- static const char *const ARMebTriples[] = {"armeb-linux-gnueabi",
- "armeb-linux-androideabi"};
+ static const char *const ARMebTriples[] = {"armeb-linux-gnueabi"};
static const char *const ARMebHFTriples[] = {
"armeb-linux-gnueabihf", "armebv7hl-redhat-linux-gnueabi"};
@@ -2112,17 +2110,15 @@
"x86_64-redhat-linux", "x86_64-suse-linux",
"x86_64-manbo-linux-gnu", "x86_64-linux-gnu",
"x86_64-slackware-linux", "x86_64-unknown-linux",
- "x86_64-amazon-linux", "x86_64-linux-android"};
+ "x86_64-amazon-linux"};
static const char *const X32Triples[] = {"x86_64-linux-gnux32",
"x86_64-pc-linux-gnux32"};
static const char *const X32LibDirs[] = {"/libx32", "/lib"};
static const char *const X86LibDirs[] = {"/lib32", "/lib"};
static const char *const X86Triples[] = {
- "i586-linux-gnu", "i686-linux-gnu",
- "i686-pc-linux-gnu", "i386-redhat-linux6E",
- "i686-redhat-linux", "i386-redhat-linux",
- "i586-suse-linux", "i686-montavista-linux",
- "i686-linux-android", "i686-gnu",
+ "i586-linux-gnu", "i686-linux-gnu", "i686-pc-linux-gnu",
+ "i386-redhat-linux6E", "i686-redhat-linux", "i386-redhat-linux",
+ "i586-suse-linux", "i686-montavista-linux", "i686-gnu",
};
static const char *const M68kLibDirs[] = {"/lib"};
@@ -2135,8 +2131,7 @@
"mips-img-linux-gnu", "mipsisa32r6-linux-gnu"};
static const char *const MIPSELLibDirs[] = {"/lib"};
static const char *const MIPSELTriples[] = {
- "mipsel-linux-gnu", "mips-img-linux-gnu", "mipsisa32r6el-linux-gnu",
- "mipsel-linux-android"};
+ "mipsel-linux-gnu", "mips-img-linux-gnu", "mipsisa32r6el-linux-gnu"};
static const char *const MIPS64LibDirs[] = {"/lib64", "/lib"};
static const char *const MIPS64Triples[] = {
@@ -2147,8 +2142,7 @@
static const char *const MIPS64ELTriples[] = {
"mips64el-linux-gnu", "mips-mti-linux-gnu",
"mips-img-linux-gnu", "mips64el-linux-gnuabi64",
- "mipsisa64r6el-linux-gnu", "mipsisa64r6el-linux-gnuabi64",
- "mips64el-linux-android"};
+ "mipsisa64r6el-linux-gnu", "mipsisa64r6el-linux-gnuabi64"};
static const char *const MIPSN32LibDirs[] = {"/lib32"};
static const char *const MIPSN32Triples[] = {"mips64-linux-gnuabin32",
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110379.374720.patch
Type: text/x-patch
Size: 4263 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210924/f7086d69/attachment.bin>
More information about the cfe-commits
mailing list