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

Cleanup of BPF object build rules #492

Merged
merged 2 commits into from
Mar 14, 2025
Merged

Cleanup of BPF object build rules #492

merged 2 commits into from
Mar 14, 2025

Conversation

tohojo
Copy link
Member

@tohojo tohojo commented Mar 14, 2025

Stop using the two-stage clang/LLC build for BPF object files, and just let
clang produce the object files directly.

Fixes #491.

tohojo added 2 commits March 14, 2025 11:37
It turns out we pass both -S and -c to clang, which has become an error
starting from clang 20. The two-stage build using 'clang -S' followed by
llc was used in the early days of BPF development, but these days, clang
is perfectly happy to produce BPF object files directly.

So use this opportunity to get rid of llc entirely, and simplify the BPF
object build rules while we're add it, by moving all of the -W* defines
to BPF_CFLAGS.

Signed-off-by: Toke Høiland-Jørgensen <[email protected]>
Add LLVM 20 and 6.13 kernels to the test matrix

Signed-off-by: Toke Høiland-Jørgensen <[email protected]>
@tohojo tohojo merged commit 9665aac into main Mar 14, 2025
41 checks passed
@tohojo tohojo deleted the remove-llc branch March 14, 2025 14:15
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.

Compilation error with clang 20
1 participant