Skip to content
Commit 56b038f8 authored by Eduard Zingerman's avatar Eduard Zingerman Committed by Yonghong Song
Browse files

[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:
  -fstack-protector
  -fstack-protector-all
  -fstack-protector-strong

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
parent c52f9485
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment