[PATCH] D142046: [BPF][clang] Ignore stack protector options for BPF target

2023-01-22 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added a comment. Hi Yonghong, Thank you for taking care of this issue. This was sloppy on my side as the parameter name was completely irrelevant for the test. Best regards, Eduard Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142046/new/

[PATCH] D142046: [BPF][clang] Ignore stack protector options for BPF target

2023-01-22 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment. In D142046#4071594 , @yonghong-song wrote: > @dyung I just pushed the fix to the 'main' branch > (https://github.com/llvm/llvm-project/commit/183d075055c591dedead7ece972f1bdea611aa3b). > Please check it out. Thanks for

[PATCH] D142046: [BPF][clang] Ignore stack protector options for BPF target

2023-01-21 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song added a comment. @dyung I just pushed the fix to the 'main' branch (https://github.com/llvm/llvm-project/commit/183d075055c591dedead7ece972f1bdea611aa3b). Please check it out. Thanks for reporting! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D142046: [BPF][clang] Ignore stack protector options for BPF target

2023-01-21 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment. Hi, our internal release build buildbot seems to have issues with this test. It seems you are expected the following function declaration in the emitted IR: define dso_local void @_Z5test1PKc(ptr noundef %msg) #0 !dbg !19 { But in a release build, it becomes: define

[PATCH] D142046: [BPF][clang] Ignore stack protector options for BPF target

2023-01-20 Thread Yonghong Song via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG56b038f887f3: [BPF][clang] Ignore stack protector options for BPF target (authored by eddyz87, committed by yonghong-song). Repository: rG LLVM

[PATCH] D142046: [BPF][clang] Ignore stack protector options for BPF target

2023-01-19 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added a comment. I can relax the warning to note to be on the same page with GCC, the reason I didn't is that similar things in DiagnosticDriverKinds.td are warnings. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142046/new/

[PATCH] D142046: [BPF][clang] Ignore stack protector options for BPF target

2023-01-19 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song added a comment. Sorry, I double checked. '-fstack-protector -fno-stack-protector' will not result in warnings. So the patch LGTM. So gentoo people can add -fno-stack-protector to suppress warnings. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D142046: [BPF][clang] Ignore stack protector options for BPF target

2023-01-19 Thread Alexei Starovoitov via Phabricator via cfe-commits
ast added a comment. In D142046#4066758 , @yonghong-song wrote: > @ast With this patch, gentoo clang compilation will hit the warning even if > people appends -fno-stack-protector. Is this okay? In general, if the option > is '-fstack-protector

[PATCH] D142046: [BPF][clang] Ignore stack protector options for BPF target

2023-01-19 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song added a comment. @ast With this patch, gentoo clang compilation will hit the warning even if people appends -fno-stack-protector. Is this okay? In general, if the option is '-fstack-protector -fno-stack-protector', we should not issue warning, right? Repository: rG LLVM Github

[PATCH] D142046: [BPF][clang] Ignore stack protector options for BPF target

2023-01-19 Thread Alexei Starovoitov via Phabricator via cfe-commits
ast accepted this revision. ast added a comment. This revision is now accepted and ready to land. This approach looks better to me than NVPTX warn and I agree with Ed that it's better to leave NVPTX as-is to avoid any regression. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D142046: [BPF][clang] Ignore stack protector options for BPF target

2023-01-19 Thread Jose E. Marchesi via Phabricator via cfe-commits
jemarch added a comment. Note that in GCC we are now emitting a note if the stack protector is requested by the user in the BPF backend: note: -fstack-protector does not work on this architecture which is less intrusive than a warning, still informative. Then the stack protector is

[PATCH] D142046: [BPF][clang] Ignore stack protector options for BPF target

2023-01-18 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song added a comment. @compnerd could you also take a look at this patch? First, some background about this patch. The reason of this patch is due to: https://lore.kernel.org/bpf/CAOFdcFPnHEc2qd-=c+hdk4ntjjfbhsf4r-g7pdjtrbat6mu...@mail.gmail.com/ Further the following link has

[PATCH] D142046: [BPF][clang] Ignore stack protector options for BPF target

2023-01-18 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added a comment. Slightly above my edit there is a similar logic for NVPTX target: static void RenderSSPOptions(const Driver , const ToolChain , const ArgList , ArgStringList , bool KernelOrKext) { const llvm::Triple =

[PATCH] D142046: [BPF][clang] Ignore stack protector options for BPF target

2023-01-18 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 created this revision. Herald added a project: All. eddyz87 requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang. Stack protector builtin functions are not implemented for BPF target, thus compiling programs with one of the