File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
llvm/include/llvm/TargetParser Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 3
3
// RUN: %clang -### --target=riscv64-linux %s 2>&1 | FileCheck --check-prefix=NODESC %s
4
4
// RUN: %clang -### --target=x86_64-linux -mtls-dialect=gnu %s 2>&1 | FileCheck --check-prefix=NODESC %s
5
5
6
+ /// Android supports TLSDESC by default on RISC-V
7
+ /// TLSDESC is not on by default in Linux, even on RISC-V, and is covered above
8
+ // RUN: %clang -### --target=riscv64-android %s 2>&1 | FileCheck --check-prefix=DESC %s
9
+
6
10
/// LTO
7
11
// RUN: %clang -### --target=riscv64-linux -flto -mtls-dialect=desc %s 2>&1 | FileCheck --check-prefix=LTO-DESC %s
8
12
// RUN: %clang -### --target=riscv64-linux -flto %s 2>&1 | FileCheck --check-prefix=LTO-NODESC %s
Original file line number Diff line number Diff line change @@ -1035,10 +1035,7 @@ class Triple {
1035
1035
1036
1036
// / True if the target supports both general-dynamic and TLSDESC, and TLSDESC
1037
1037
// / is enabled by default.
1038
- bool hasDefaultTLSDESC () const {
1039
- // TODO: Improve check for other platforms, like Android, and RISC-V
1040
- return false ;
1041
- }
1038
+ bool hasDefaultTLSDESC () const { return isAndroid () && isRISCV64 (); }
1042
1039
1043
1040
// / Tests whether the target uses -data-sections as default.
1044
1041
bool hasDefaultDataSections () const {
You can’t perform that action at this time.
0 commit comments