Skip to content

Commit a67b035

Browse files
committed
[Android] Drop workarounds for older Android API levels pre 23
Drop workarounds for Android API levels pre 23.
1 parent 79d1524 commit a67b035

File tree

5 files changed

+6
-28
lines changed

5 files changed

+6
-28
lines changed

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7870,7 +7870,6 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
78707870

78717871
if (Triple.isAArch64() &&
78727872
(Args.hasArg(options::OPT_mno_fmv) ||
7873-
(Triple.isAndroid() && Triple.isAndroidVersionLT(23)) ||
78747873
getToolChain().GetRuntimeLibType(Args) != ToolChain::RLT_CompilerRT)) {
78757874
// Disable Function Multiversioning on AArch64 target.
78767875
CmdArgs.push_back("-target-feature");

clang/lib/Driver/ToolChains/Linux.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -300,12 +300,10 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
300300
// and the MIPS ABI require .dynsym to be sorted in different ways.
301301
// .gnu.hash needs symbols to be grouped by hash code whereas the MIPS
302302
// ABI requires a mapping between the GOT and the symbol table.
303-
// Android loader does not support .gnu.hash until API 23.
304303
// Hexagon linker/loader does not support .gnu.hash
305304
if (!IsMips && !IsHexagon) {
306305
if (Distro.IsOpenSUSE() || Distro == Distro::UbuntuLucid ||
307-
Distro == Distro::UbuntuJaunty || Distro == Distro::UbuntuKarmic ||
308-
(IsAndroid && Triple.isAndroidVersionLT(23)))
306+
Distro == Distro::UbuntuJaunty || Distro == Distro::UbuntuKarmic)
309307
ExtraOpts.push_back("--hash-style=both");
310308
else
311309
ExtraOpts.push_back("--hash-style=gnu");

clang/test/Driver/aarch64-features.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,10 @@
88
// CHECK: fno-signed-char
99

1010
// Check Function Multi Versioning option and rtlib dependency.
11-
// RUN: %clang --target=aarch64-linux-android23 -rtlib=compiler-rt \
12-
// RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-FMV %s
1311
// RUN: %clang --target=aarch64-linux-android -rtlib=compiler-rt \
14-
// RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-FMV-OFF %s
12+
// RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-FMV %s
1513
// RUN: %clang --target=aarch64-linux-android -rtlib=compiler-rt -mno-fmv \
1614
// RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-FMV-OFF %s
17-
// RUN: %clang --target=aarch64-linux-android22 -rtlib=compiler-rt \
18-
// RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-FMV-OFF %s
1915

2016
// RUN: %clang --target=aarch64-linux-gnu -rtlib=libgcc \
2117
// RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-FMV-OFF %s

clang/test/Driver/aarch64-fmv.c

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,16 @@
11
// Test which driver flags enable/disable Function Multiversioning on aarch64.
22

3-
// FMV is enabled for non-android aarch64 targets:
3+
// FMV is enabled with compiler-rt:
44
// RUN: %clang --target=aarch64 --rtlib=compiler-rt -### -c %s 2>&1 | FileCheck -check-prefix=FMV-ENABLED %s
55
// RUN: %clang --target=aarch64-linux-gnu --rtlib=compiler-rt -### -c %s 2>&1 | FileCheck -check-prefix=FMV-ENABLED %s
6+
// RUN: %clang --target=aarch64-linux-android --rtlib=compiler-rt -### -c %s 2>&1 | FileCheck -check-prefix=FMV-ENABLED %s
67
// RUN: %clang --target=arm64-apple-ios --rtlib=compiler-rt -### -c %s 2>&1 | FileCheck -check-prefix=FMV-ENABLED %s
78
// RUN: %clang --target=arm64-apple-macosx --rtlib=compiler-rt -### -c %s 2>&1 | FileCheck -check-prefix=FMV-ENABLED %s
89

9-
// android23 defaults to --rtlib=compiler-rt:
10-
// RUN: %clang --target=aarch64-linux-android23 -### -c %s 2>&1 | FileCheck -check-prefix=FMV-ENABLED %s
11-
// RUN: %clang --target=aarch64-linux-android23 --rtlib=compiler-rt -### -c %s 2>&1 | FileCheck -check-prefix=FMV-ENABLED %s
12-
1310
// FMV is disabled without compiler-rt:
1411
// RUN: %clang --rtlib=libgcc --target=aarch64 -### -c %s 2>&1 | FileCheck -check-prefix=FMV-DISABLED %s
1512
// RUN: %clang --rtlib=libgcc --target=aarch64-linux-gnu -### -c %s 2>&1 | FileCheck -check-prefix=FMV-DISABLED %s
1613

17-
// Disabled for older android versions:
18-
// RUN: %clang --rtlib=compiler-rt --target=aarch64-linux-android -### -c %s 2>&1 | FileCheck -check-prefix=FMV-DISABLED %s
19-
// RUN: %clang --rtlib=compiler-rt --target=aarch64-linux-android22 -### -c %s 2>&1 | FileCheck -check-prefix=FMV-DISABLED %s
20-
// RUN: %clang --rtlib=compiler-rt --target=aarch64-linux-android22 -mno-fmv -### -c %s 2>&1 | FileCheck -check-prefix=FMV-DISABLED %s
21-
2214
// Disabled explicitly:
2315
// RUN: %clang --rtlib=compiler-rt --target=aarch64 -mno-fmv -### -c %s 2>&1 | FileCheck -check-prefix=FMV-DISABLED %s
2416
// RUN: %clang --rtlib=compiler-rt --target=aarch64-linux-android23 -mno-fmv -### -c %s 2>&1 | FileCheck -check-prefix=FMV-DISABLED %s

clang/test/Driver/linux-ld.c

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -926,16 +926,9 @@
926926
// CHECK-MIPS64EL-REDHAT-NOT: "-dynamic-linker" "{{.*}}/lib{{(64)?}}/ld-musl-mipsel.so.1"
927927
// CHECK-MIPS64EL-REDHAT-NOT: "--hash-style={{gnu|both}}"
928928

929-
// Check that we pass --hash-style=both for pre-M Android versions and
930-
// --hash-style=gnu for newer Android versions.
929+
// Check that we pass --hash-style=gnu.
931930
// RUN: %clang -### %s -no-pie 2>&1 \
932-
// RUN: --target=armv7-linux-android21 \
933-
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-HASH-STYLE-L %s
934-
// CHECK-ANDROID-HASH-STYLE-L: "{{.*}}ld{{(.exe)?}}"
935-
// CHECK-ANDROID-HASH-STYLE-L: "--hash-style=both"
936-
//
937-
// RUN: %clang -### %s -no-pie 2>&1 \
938-
// RUN: --target=armv7-linux-android23 \
931+
// RUN: --target=armv7-linux-android \
939932
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-HASH-STYLE-M %s
940933
// CHECK-ANDROID-HASH-STYLE-M: "{{.*}}ld{{(.exe)?}}"
941934
// CHECK-ANDROID-HASH-STYLE-M: "--hash-style=gnu"

0 commit comments

Comments
 (0)