Skip to content

Commit 5f07464

Browse files
kettenismordak
authored andcommitted
Make sure -msign-return-address doesn't disable BTI support.
ok deraadt@
1 parent 4ceee5c commit 5f07464

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1588,7 +1588,10 @@ static void CollectARMPACBTIOptions(const ToolChain &TC, const ArgList &Args,
15881588
D.Diag(diag::err_drv_unsupported_option_argument)
15891589
<< A->getSpelling() << Scope;
15901590
Key = "a_key";
1591-
IndirectBranches = false;
1591+
if (Triple.isOSOpenBSD())
1592+
IndirectBranches = true;
1593+
else
1594+
IndirectBranches = false;
15921595
} else {
15931596
StringRef DiagMsg;
15941597
llvm::ARM::ParsedBranchProtection PBP;

0 commit comments

Comments
 (0)