Skip to content

Commit 5d774ec

Browse files
authored
[Driver] Enable outline atomics for OpenBSD/aarch64 (#155713)
1 parent 8a01982 commit 5d774ec

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

clang/lib/Driver/ToolChains/OpenBSD.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,11 @@ class LLVM_LIBRARY_VISIBILITY OpenBSD : public Generic_ELF {
7979
void AddCXXStdlibLibArgs(const llvm::opt::ArgList &Args,
8080
llvm::opt::ArgStringList &CmdArgs) const override;
8181

82+
bool IsAArch64OutlineAtomicsDefault(
83+
const llvm::opt::ArgList &Args) const override {
84+
return true;
85+
}
86+
8287
std::string getCompilerRT(const llvm::opt::ArgList &Args, StringRef Component,
8388
FileType Type = ToolChain::FT_Static,
8489
bool IsFortran = false) const override;

clang/test/Driver/aarch64-features.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
// RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-OFF %s
4646

4747
// RUN: %clang --target=aarch64-unknown-openbsd -rtlib=compiler-rt \
48-
// RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-OFF %s
48+
// RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-ON %s
4949

5050
// RUN: %clang --target=aarch64-linux-gnu -rtlib=libgcc \
5151
// RUN: --gcc-toolchain=%S/Inputs/aarch64-linux-gnu-tree/gcc-10 \

0 commit comments

Comments
 (0)