[llvm] [clang][driver] Set TLSDESC as the default for Android on RISC-V (PR #81198)
Paul Kirth via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 8 14:22:42 PST 2024
https://github.com/ilovepi created https://github.com/llvm/llvm-project/pull/81198
None
>From 3221a5e60c58e64dabdf23c52d33ba7ed5bdf81e Mon Sep 17 00:00:00 2001
From: Paul Kirth <paulkirth at google.com>
Date: Thu, 8 Feb 2024 14:21:49 -0800
Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=
=?UTF-8?q?l=20version?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Created using spr 1.3.4
---
llvm/include/llvm/TargetParser/Triple.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/llvm/include/llvm/TargetParser/Triple.h b/llvm/include/llvm/TargetParser/Triple.h
index 98d8490cc9f7a..0382d97d3fe38 100644
--- a/llvm/include/llvm/TargetParser/Triple.h
+++ b/llvm/include/llvm/TargetParser/Triple.h
@@ -1036,8 +1036,7 @@ class Triple {
/// True if the target supports both general-dynamic and TLSDESC, and TLSDESC
/// is enabled by default.
bool hasDefaultTLSDESC() const {
- // TODO: Improve check for other platforms, like Android, and RISC-V
- return false;
+ return isAndroid() && (!isAndroidVersionLT(29) || isRISCV64());
}
/// Tests whether the target uses -data-sections as default.
More information about the llvm-commits
mailing list