Skip to content

[Driver] Default Generic_GCC aarch64_be to -fasynchronous-unwind-tables #72971

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 23, 2023
Merged

[Driver] Default Generic_GCC aarch64_be to -fasynchronous-unwind-tables #72971

merged 1 commit into from
Nov 23, 2023

Conversation

dongjianqiang2
Copy link
Contributor

This patch defaults Generic_GCC aarch64_be to use -fasynchronous-unwind-tables and ensures consistent behavior with aarch64 little endian.

This patch defaults Generic_GCC aarch64_be to use -fasynchronous-unwind-tables.
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' labels Nov 21, 2023
@llvmbot
Copy link
Member

llvmbot commented Nov 21, 2023

@llvm/pr-subscribers-clang-driver

@llvm/pr-subscribers-clang

Author: dong jianqiang (dongjianqiang2)

Changes

This patch defaults Generic_GCC aarch64_be to use -fasynchronous-unwind-tables and ensures consistent behavior with aarch64 little endian.


Full diff: https://github.com/llvm/llvm-project/pull/72971.diff

2 Files Affected:

  • (modified) clang/lib/Driver/ToolChains/Gnu.cpp (+1)
  • (modified) clang/test/Driver/aarch64-features.c (+1)
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"

@hstk30-hw hstk30-hw requested a review from MaskRay November 22, 2023 01:13
@hstk30-hw hstk30-hw merged commit b14f651 into llvm:main Nov 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants