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

build: use upstream clang instead of forked version for BPF programs #146

Merged
merged 4 commits into from
Jun 14, 2022

Conversation

willfindlay
Copy link
Contributor

@willfindlay willfindlay commented Jun 9, 2022

Use an upstreamed version of clang (clang-13) instead of our forked version. We provide a Docker image for convenience, but any distribution's clang should work provided it is >= clang-13. See individual commits.

Fixes #142

@willfindlay willfindlay force-pushed the pr/willfindlay/use-upstream-clang branch 12 times, most recently from 1ddc072 to 605901c Compare June 10, 2022 20:24
@willfindlay willfindlay temporarily deployed to release-clang June 13, 2022 02:24 Inactive
@willfindlay willfindlay force-pushed the pr/willfindlay/use-upstream-clang branch from cb3a78c to a32fd65 Compare June 13, 2022 02:30
@willfindlay willfindlay force-pushed the pr/willfindlay/use-upstream-clang branch from d630ecb to 3954fcb Compare June 13, 2022 02:35
@willfindlay willfindlay temporarily deployed to release-clang June 13, 2022 02:35 Inactive
@willfindlay willfindlay force-pushed the pr/willfindlay/use-upstream-clang branch from 3954fcb to 7ea8dd5 Compare June 14, 2022 14:32
@willfindlay willfindlay temporarily deployed to release-clang June 14, 2022 14:32 Inactive
@willfindlay willfindlay force-pushed the pr/willfindlay/use-upstream-clang branch from 7ea8dd5 to 52b8f81 Compare June 14, 2022 14:40
We were defining a0, a1, a2, a3, and a4 in every tail call program, even though we really
only needed one per program. Remove the extras to fix the unused variable error when
compiling on latest clang.

Signed-off-by: William Findlay <will@isovalent.com>
We have a nop binary now but it wasn't being ignored in VCS. Let's fix that so we don't
check it in by accident.

Signed-off-by: William Findlay <will@isovalent.com>
Use apt-get instead of apt to silence warnings. Remove CLANG_INSTALL_DIR from the
tools-install target because it no longer exists.

Signed-off-by: William Findlay <will@isovalent.com>
Introduce a new Docker image that provides a suitable clang version for compiling our BPF
programs.

Signed-off-by: William Findlay <will@isovalent.com>
@willfindlay
Copy link
Contributor Author

Note, I cancelled the clang build job since I already ran this on a previous revision of this PR and the Dockerfile has not changed. So we can ignore the "failure" here.

@willfindlay willfindlay marked this pull request as ready for review June 14, 2022 14:44
@willfindlay willfindlay requested a review from a team as a code owner June 14, 2022 14:44
@willfindlay willfindlay changed the title INPROGRESS: use upstream clang instead of forked version for BPF programs build: use upstream clang instead of forked version for BPF programs Jun 14, 2022
@jrfastab
Copy link
Contributor

I wouldn't block this for this, but why not clang14?

@willfindlay
Copy link
Contributor Author

@jrfastab honestly no reason, I'll bump it and see if anything breaks.

@willfindlay
Copy link
Contributor Author

willfindlay commented Jun 14, 2022

Hitting over 1M instructions on execve programs under clang-14. I'll create an issue for now and we can ship this with clang-13. Edit: issue is here #164

@willfindlay willfindlay merged commit f87f1f3 into main Jun 14, 2022
@willfindlay willfindlay deleted the pr/willfindlay/use-upstream-clang branch June 14, 2022 22:11
@willfindlay willfindlay restored the pr/willfindlay/use-upstream-clang branch June 14, 2022 22:33
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.

tetragon: use released clang
2 participants