[clang] 1089cdd - Revert "Driver: Don't warn on -mbranch-protection when linking"

Tom Stellard via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 22 23:37:13 PDT 2022


Author: Tom Stellard
Date: 2022-03-22T23:36:57-07:00
New Revision: 1089cdda776bbd437d6507242f2621ec83af7118

URL: https://github.com/llvm/llvm-project/commit/1089cdda776bbd437d6507242f2621ec83af7118
DIFF: https://github.com/llvm/llvm-project/commit/1089cdda776bbd437d6507242f2621ec83af7118.diff

LOG: Revert "Driver: Don't warn on -mbranch-protection when linking"

This reverts commit 98fd3b359866f474ab1c097c22fb5c3be356b996.

This patch broke multiple bots.

Added: 
    

Modified: 
    clang/include/clang/Driver/Options.td
    clang/test/Driver/aarch64-security-options.c

Removed: 
    clang/test/Driver/Inputs/main.c


################################################################################
diff  --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td
index e35b36af91c33..2a23695c149fa 100644
--- a/clang/include/clang/Driver/Options.td
+++ b/clang/include/clang/Driver/Options.td
@@ -3442,7 +3442,6 @@ def msign_return_address_EQ : Joined<["-"], "msign-return-address=">,
   Flags<[CC1Option]>, Group<m_Group>, Values<"none,all,non-leaf">,
   HelpText<"Select return address signing scope">;
 def mbranch_protection_EQ : Joined<["-"], "mbranch-protection=">,
-  Group<m_Group>,
   HelpText<"Enforce targets of indirect branches and function returns">;
 
 def mharden_sls_EQ : Joined<["-"], "mharden-sls=">,

diff  --git a/clang/test/Driver/Inputs/main.c b/clang/test/Driver/Inputs/main.c
deleted file mode 100644
index 5c2fa9bb6a78e..0000000000000
--- a/clang/test/Driver/Inputs/main.c
+++ /dev/null
@@ -1,3 +0,0 @@
-int main(int argc, char **argv) {
-  return 0;
-}

diff  --git a/clang/test/Driver/aarch64-security-options.c b/clang/test/Driver/aarch64-security-options.c
index e9db540d53ede..6ea4b8ae58385 100644
--- a/clang/test/Driver/aarch64-security-options.c
+++ b/clang/test/Driver/aarch64-security-options.c
@@ -27,10 +27,6 @@
 // RUN: %clang -target aarch64--none-eabi -c %s -### -mbranch-protection=bar     2>&1 | \
 // RUN: FileCheck %s --check-prefix=BAD-BP-PROTECTION --check-prefix=WARN
 
-// RUN: %clang -target aarch64--none-eabi -o %t-main.o -mbranch-protection=standard -c %S/Inputs/main.c
-// RUN: %clang -target aarch64--none-eabi -o %t-main -mbranch-protection=standard %t-main.o 2>&1 | \
-// RUN: FileCheck --allow-empty %s --check-prefix=LINKER-DRIVER
-
 // WARN-NOT: warning: ignoring '-mbranch-protection=' option because the 'aarch64' architecture does not support it [-Wbranch-protection]
 
 // RA-OFF: "-msign-return-address=none"
@@ -50,7 +46,3 @@
 
 // BAD-B-KEY-COMBINATION: invalid branch protection option 'b-key' in '-mbranch-protection={{.*}}'
 // BAD-LEAF-COMBINATION: invalid branch protection option 'leaf' in '-mbranch-protection={{.*}}'
-
-// Check that the linker driver doesn't warn about -mbranch-protection=standard
-// as an unused option.
-// LINKER-DRIVER-NOT: warning:


        


More information about the cfe-commits mailing list