Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mirror: Always disable unused CLI arguments warning for feature probe #171

Merged
merged 1 commit into from
Oct 17, 2024

Conversation

qmonnet
Copy link
Member

@qmonnet qmonnet commented Oct 17, 2024

In commit 8a2d7d5 ("mirror: Fix features detection for building with clang") we prevented clang to error out when encountering unused command-line arguments in the feature probes, because we do add unused arguments for some of the probes when retrieving arguments from llvm-config, and we don't want probes to fail because of that.

At the time, the issue was apparent for the LLVM-based disassembler, so we added -Wno-unused-command-line-argument when $(LLVM) was enabled, only. We missed the case when we're building bpftool with clang instead of gcc, without building the LLVM disassembler. Let's disable the warning unconditionally instead to fix this case.

Fixes: #170

In commit 8a2d7d5 ("mirror: Fix features detection for building
with clang") we prevented clang to error out when encountering unused
command-line arguments in the feature probes, because we do add unused
arguments for some of the probes when retrieving arguments from
llvm-config, and we don't want probes to fail because of that.

At the time, the issue was apparent for the LLVM-based disassembler, so
we added -Wno-unused-command-line-argument when $(LLVM) was enabled,
only. We missed the case when we're building bpftool with clang instead
of gcc, without building the LLVM disassembler. Let's disable the
warning unconditionally instead to fix this case.

Reported-by: Holger Hoffstätte <holger@applied-asynchrony.com>
Signed-off-by: Quentin Monnet <qmo@kernel.org>
@qmonnet qmonnet merged commit 3be8ac3 into libbpf:main Oct 17, 2024
6 checks passed
@qmonnet qmonnet deleted the pr/cli-unused-arg branch October 17, 2024 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Building with clang breaks feature detection due to -Werror
1 participant