[all-commits] [llvm/llvm-project] 98fd3b: Driver: Don't warn on -mbranch-protection when lin...

Tom Stellard via All-commits all-commits at lists.llvm.org
Tue Mar 22 23:18:32 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 98fd3b359866f474ab1c097c22fb5c3be356b996
      https://github.com/llvm/llvm-project/commit/98fd3b359866f474ab1c097c22fb5c3be356b996
  Author: Tom Stellard <tstellar at redhat.com>
  Date:   2022-03-22 (Tue, 22 Mar 2022)

  Changed paths:
    M clang/include/clang/Driver/Options.td
    A clang/test/Driver/Inputs/main.c
    M clang/test/Driver/aarch64-security-options.c

  Log Message:
  -----------
  Driver: Don't warn on -mbranch-protection when linking

The -mbranch-protection definition in Options.td was not given a Group,
so this was causing clang to emit a -Wunused-command-line-argument
warning when this flag was passed to the linker driver.  This was a
problem, because some build systems, like cmake, automatically pass the
C flags to the linker.  Therefore, any program that was compiled with
-Werror and -mbranch-protection would fail to link with the error:

argument unused during compilation: '-mbranch-protection=standard' [-Werror,-Wunused-command-line-argument]

Reviewed By: vhscampos

Differential Revision: https://reviews.llvm.org/D121983




More information about the All-commits mailing list