Skip to content

Commit 8d3b9a3

Browse files
committed
[Driver] Enable outline atomics for FreeBSD/aarch64
1 parent a4ac04d commit 8d3b9a3

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

clang/lib/Driver/ToolChains/FreeBSD.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ class LLVM_LIBRARY_VISIBILITY FreeBSD : public Generic_ELF {
7878
void AddHIPIncludeArgs(const llvm::opt::ArgList &DriverArgs,
7979
llvm::opt::ArgStringList &CC1Args) const override;
8080

81+
bool IsAArch64OutlineAtomicsDefault(
82+
const llvm::opt::ArgList &Args) const override {
83+
return true;
84+
}
85+
8186
UnwindTableLevel
8287
getDefaultUnwindTableLevel(const llvm::opt::ArgList &Args) const override;
8388
bool isPIEDefault(const llvm::opt::ArgList &Args) const override;

clang/test/Driver/aarch64-features.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@
4444
// RUN: %clang --target=aarch64-windows-gnu -rtlib=compiler-rt \
4545
// RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-OFF %s
4646

47+
// RUN: %clang --target=aarch64-unknown-freebsd -rtlib=compiler-rt \
48+
// RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-ON %s
49+
4750
// RUN: %clang --target=aarch64-unknown-openbsd -rtlib=compiler-rt \
4851
// RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-ON %s
4952

0 commit comments

Comments
 (0)