[llvm] Enable TLSDESC by default on Fuchsia targets (#124990)
Fuchsia uses TLSDESC by default for all target architectures. We also make the comment and check for hasDefaultTLSDESC more accurately reflect its usage.
This commit is contained in:
@@ -10,6 +10,11 @@
|
||||
/// TLSDESC is not on by default in Linux, even on RISC-V, and is covered above
|
||||
// RUN: %clang -### --target=riscv64-android %s 2>&1 | FileCheck --check-prefix=DESC %s
|
||||
|
||||
/// Fuchsia supports TLSDESC by default for all architectures.
|
||||
// RUN: %clang -### --target=riscv64-unknown-fuchsia %s 2>&1 | FileCheck --check-prefix=DESC %s
|
||||
// RUN: %clang -### --target=aarch64-unknown-fuchsia %s 2>&1 | FileCheck --check-prefix=DESC %s
|
||||
// RUN: %clang -### --target=x86_64-unknown-fuchsia %s 2>&1 | FileCheck --check-prefix=DESC %s
|
||||
|
||||
/// LTO
|
||||
// RUN: %clang -### --target=loongarch64-linux -flto -mtls-dialect=desc %s 2>&1 | FileCheck --check-prefix=LTO-DESC %s
|
||||
// RUN: %clang -### --target=loongarch64-linux -flto %s 2>&1 | FileCheck --check-prefix=LTO-NODESC %s
|
||||
|
||||
@@ -1123,9 +1123,10 @@ public:
|
||||
isWindowsCygwinEnvironment() || isOHOSFamily();
|
||||
}
|
||||
|
||||
/// True if the target supports both general-dynamic and TLSDESC, and TLSDESC
|
||||
/// is enabled by default.
|
||||
bool hasDefaultTLSDESC() const { return isAndroid() && isRISCV64(); }
|
||||
/// True if the target uses TLSDESC by default.
|
||||
bool hasDefaultTLSDESC() const {
|
||||
return isAArch64() || (isAndroid() && isRISCV64()) || isOSFuchsia();
|
||||
}
|
||||
|
||||
/// Tests whether the target uses -data-sections as default.
|
||||
bool hasDefaultDataSections() const {
|
||||
|
||||
Reference in New Issue
Block a user