[Driver] Default Generic_GCC aarch64 to -fasynchronous-unwind-tables

In GCC, `aarch64-*-linux` and `aarch64-*-freebsd` made the switch in 2018
(https://gcc.gnu.org/pipermail/gcc-patches/2018-March/495549.html).
In Clang, FreeBSD/Fuchsia/NetBSD/MinGW aarch64 default to -fasynchronous-unwind-tables.

This patch defaults Generic_GCC aarch64 (which affects Linux) to use -fasynchronous-unwind-tables.

Reviewed By: nickdesaulniers

Differential Revision: https://reviews.llvm.org/D91760
This commit is contained in:
Fangrui Song 2020-11-24 09:51:32 -08:00
parent 4926eed59c
commit f96fef89b5
2 changed files with 9 additions and 1 deletions

View File

@ -2672,7 +2672,13 @@ void Generic_GCC::printVerboseInfo(raw_ostream &OS) const {
}
bool Generic_GCC::IsUnwindTablesDefault(const ArgList &Args) const {
return getArch() == llvm::Triple::x86_64;
switch (getArch()) {
case llvm::Triple::aarch64:
case llvm::Triple::x86_64:
return true;
default:
return false;
}
}
bool Generic_GCC::isPICDefault() const {

View File

@ -1,6 +1,8 @@
// RUN: %clang -target aarch64-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: "-munwind-tables"
// The AArch64 PCS states that chars should be unsigned.
// CHECK: fno-signed-char