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

Upgrade to LLVM 14, introduce clang-format #612

Merged
merged 4 commits into from
Mar 29, 2022

Conversation

ti-mo
Copy link
Collaborator

@ti-mo ti-mo commented Mar 29, 2022

This PR upgrades testdata and examples to build against LLVM14. Call clang-format during make.

@ti-mo ti-mo requested a review from lmb March 29, 2022 15:20
ti-mo added 2 commits March 29, 2022 17:21
Signed-off-by: Timo Beckers <timo@isovalent.com>
clang-format re-orders common.h to be included after bpf_helper_defs.h,
which is not possible due to the latter depending on __u64.

Include common.h at the start of bpf_helpers.h instead.

Signed-off-by: Timo Beckers <timo@isovalent.com>
@ti-mo ti-mo force-pushed the tb/clang-format branch from cbb6f2e to fa8846e Compare March 29, 2022 15:22
ti-mo added 2 commits March 29, 2022 17:29
This commit adds the clang-format make target, runs it on the whole repository
and rebuilds all testdata and example ELFs.

Signed-off-by: Timo Beckers <timo@isovalent.com>
Signed-off-by: Timo Beckers <timo@isovalent.com>

diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml
index ac44f95..b9a2fb8 100644
--- a/.semaphore/semaphore.yml
+++ b/.semaphore/semaphore.yml
@@ -52,7 +52,7 @@ blocks:
           - ( export GOARCH=arm64; go build ./... && for p in $(go list ./...) ; do go test -c $p || exit ; done )
           - make clean
           - make container-all
-          - git diff --exit-code || { echo "generated files are not up to date" >&2; false; }
+          - git diff --exit-code || { echo "found unformatted source files, or generated files are not up to date, run 'make'" >&2; false; }
           - pushd ./examples
           - go build -v -o "$(mktemp -d)" ./...
           - popd
@ti-mo ti-mo force-pushed the tb/clang-format branch from fa8846e to a303464 Compare March 29, 2022 15:34
@ti-mo ti-mo merged commit a4ccb18 into cilium:master Mar 29, 2022
@ti-mo ti-mo deleted the tb/clang-format branch March 29, 2022 15: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.

2 participants