Skip to content

Commit 990129f

Browse files
committed
Make -mbranch-protection=bti the default on OpenBSD.
ok deraadt@
1 parent df816d4 commit 990129f

File tree

1 file changed

+3
-0
lines changed
  • gnu/llvm/clang/lib/Driver/ToolChains

1 file changed

+3
-0
lines changed

gnu/llvm/clang/lib/Driver/ToolChains/Clang.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -1818,6 +1818,9 @@ void Clang::AddAArch64TargetArgs(const ArgList &Args,
18181818
Args.MakeArgString(Twine("-msign-return-address-key=") + Key));
18191819
if (IndirectBranches)
18201820
CmdArgs.push_back("-mbranch-target-enforce");
1821+
} else {
1822+
if (Triple.isOSOpenBSD())
1823+
CmdArgs.push_back("-mbranch-target-enforce");
18211824
}
18221825

18231826
// Handle -msve_vector_bits=<bits>

0 commit comments

Comments
 (0)