[clang] [Driver] Default Generic_GCC aarch64_be to -fasynchronous-unwind-tables (PR #72971)
dong jianqiang via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 21 01:03:43 PST 2023
https://github.com/dongjianqiang2 created https://github.com/llvm/llvm-project/pull/72971
This patch defaults Generic_GCC aarch64_be to use -fasynchronous-unwind-tables and ensures consistent behavior with aarch64 little endian.
>From f8adcd49a4627926ac8009c595c6b0103589e600 Mon Sep 17 00:00:00 2001
From: Dong JianQiang <dongjianqiang2 at huawei.com>
Date: Tue, 21 Nov 2023 16:15:52 +0800
Subject: [PATCH] [Driver] Default Generic_GCC aarch64_be to
-fasynchronous-unwind-tables
This patch defaults Generic_GCC aarch64_be to use -fasynchronous-unwind-tables.
---
clang/lib/Driver/ToolChains/Gnu.cpp | 1 +
clang/test/Driver/aarch64-features.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp
index 2b1e8f02cf66388..782618236ff8982 100644
--- a/clang/lib/Driver/ToolChains/Gnu.cpp
+++ b/clang/lib/Driver/ToolChains/Gnu.cpp
@@ -2937,6 +2937,7 @@ ToolChain::UnwindTableLevel
Generic_GCC::getDefaultUnwindTableLevel(const ArgList &Args) const {
switch (getArch()) {
case llvm::Triple::aarch64:
+ case llvm::Triple::aarch64_be:
case llvm::Triple::ppc:
case llvm::Triple::ppcle:
case llvm::Triple::ppc64:
diff --git a/clang/test/Driver/aarch64-features.c b/clang/test/Driver/aarch64-features.c
index a797cc0cf9084c2..d2075c91314a8b2 100644
--- a/clang/test/Driver/aarch64-features.c
+++ b/clang/test/Driver/aarch64-features.c
@@ -1,4 +1,5 @@
// RUN: %clang --target=aarch64-none-linux-gnu -### %s -fsyntax-only 2>&1 | FileCheck %s
+// RUN: %clang --target=aarch64_be-none-linux-gnu -### %s -fsyntax-only 2>&1 | FileCheck %s
// RUN: %clang --target=arm64-none-linux-gnu -### %s -fsyntax-only 2>&1 | FileCheck %s
// CHECK: "-funwind-tables=2"
More information about the cfe-commits
mailing list