File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
llvm/include/llvm/TargetParser Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 10
10
/// TLSDESC is not on by default in Linux, even on RISC-V, and is covered above
11
11
// RUN: %clang -### --target=riscv64-android %s 2>&1 | FileCheck --check-prefix=DESC %s
12
12
13
+ /// Fuchsia supports TLSDESC by default for all architectures.
14
+ // RUN: %clang -### --target=riscv64-unknown-fuchsia %s 2>&1 | FileCheck --check-prefix=DESC %s
15
+ // RUN: %clang -### --target=aarch64-unknown-fuchsia %s 2>&1 | FileCheck --check-prefix=DESC %s
16
+ // RUN: %clang -### --target=x86_64-unknown-fuchsia %s 2>&1 | FileCheck --check-prefix=DESC %s
17
+
13
18
/// LTO
14
19
// RUN: %clang -### --target=loongarch64-linux -flto -mtls-dialect=desc %s 2>&1 | FileCheck --check-prefix=LTO-DESC %s
15
20
// RUN: %clang -### --target=loongarch64-linux -flto %s 2>&1 | FileCheck --check-prefix=LTO-NODESC %s
Original file line number Diff line number Diff line change @@ -1119,7 +1119,9 @@ class Triple {
1119
1119
1120
1120
// / True if the target supports both general-dynamic and TLSDESC, and TLSDESC
1121
1121
// / is enabled by default.
1122
- bool hasDefaultTLSDESC () const { return isAndroid () && isRISCV64 (); }
1122
+ bool hasDefaultTLSDESC () const {
1123
+ return (isAndroid () && isRISCV64 ()) || isOSFuchsia ();
1124
+ }
1123
1125
1124
1126
// / Tests whether the target uses -data-sections as default.
1125
1127
bool hasDefaultDataSections () const {
You can’t perform that action at this time.
0 commit comments