Skip to content

Commit

Permalink
Make -mbranch-protection=bti the default on OpenBSD.
Browse files Browse the repository at this point in the history
ok deraadt@
  • Loading branch information
kettenis committed Apr 17, 2023
1 parent df816d4 commit 990129f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gnu/llvm/clang/lib/Driver/ToolChains/Clang.cpp
Expand Up @@ -1818,6 +1818,9 @@ void Clang::AddAArch64TargetArgs(const ArgList &Args,
Args.MakeArgString(Twine("-msign-return-address-key=") + Key));
if (IndirectBranches)
CmdArgs.push_back("-mbranch-target-enforce");
} else {
if (Triple.isOSOpenBSD())
CmdArgs.push_back("-mbranch-target-enforce");
}

// Handle -msve_vector_bits=<bits>
Expand Down

0 comments on commit 990129f

Please sign in to comment.