Merge "rust: Add BTI/PAC for supported targets." into main

This commit is contained in:
Ivan Lozano
2023-07-26 18:11:17 +00:00
committed by Gerrit Code Review

View File

@@ -26,11 +26,18 @@ var (
Arm64LinkFlags = []string{}
Arm64ArchVariantRustFlags = map[string][]string{
"armv8-a": []string{},
"armv8-a-branchprot": []string{},
"armv8-2a": []string{},
"armv8-2a-dotprod": []string{},
"armv9-a": []string{},
"armv8-a": []string{},
"armv8-a-branchprot": []string{
// branch-protection=bti,pac-ret is equivalent to Clang's mbranch-protection=standard
"-Z branch-protection=bti,pac-ret",
},
"armv8-2a": []string{},
"armv8-2a-dotprod": []string{},
"armv9-a": []string{
// branch-protection=bti,pac-ret is equivalent to Clang's mbranch-protection=standard
"-Z branch-protection=bti,pac-ret",
"-Z stack-protector=none",
},
}
)