[all-commits] [llvm/llvm-project] 56b038: [BPF][clang] Ignore stack protector options for BP...

eddyz87 via All-commits all-commits at lists.llvm.org
Fri Jan 20 15:16:35 PST 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 56b038f887f37f69afac2d3abe02b46dcb9305ec
  Author: Eduard Zingerman <eddyz87 at gmail.com>
  Date:   2023-01-20 (Fri, 20 Jan 2023)

  Changed paths:
    M clang/lib/Driver/ToolChains/Clang.cpp
    A clang/test/CodeGen/bpf-stack-protector.c

  Log Message:
  [BPF][clang] Ignore stack protector options for BPF target

Stack protector builtin functions are not implemented for BPF target,
thus compiling programs with one of the following options would result
in an error:

This commit adds logic to ignore these options for BPF target.
Searching through DiagnosticDriverKinds.td shows that all messages for
such kind of behavior are implemented as warnings, this commit follows
the suit.

Here is an example of the diagnostic message:
  clang-16: warning: ignoring '-fstack-protector' option as it is not currently supported for target 'bpf' [-Woption-ignored]

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

More information about the All-commits mailing list