clippy.sh 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. #!/usr/bin/env sh
  2. set -eux
  3. # `-C panic=abort` because "unwinding panics are not supported without std"; integration-ebpf
  4. # contains `#[no_std]` binaries.
  5. #
  6. # `-Zpanic_abort_tests` because "building tests with panic=abort is not supported without
  7. # `-Zpanic_abort_tests`"; Cargo does this automatically when panic=abort is set via profile but we
  8. # want to preserve unwinding at runtime - here we are just running clippy so we don't care about
  9. # unwinding behavior.
  10. #
  11. # `+nightly` because "the option `Z` is only accepted on the nightly compiler".
  12. cargo +nightly hack clippy "$@" \
  13. --all-targets \
  14. --feature-powerset \
  15. -- --deny warnings \
  16. -C panic=abort \
  17. -Zpanic_abort_tests
  18. for arch in aarch64 arm loongarch64 mips powerpc64 riscv64 s390x x86_64; do
  19. for target in bpfeb-unknown-none bpfel-unknown-none; do
  20. RUSTFLAGS="--cfg bpf_target_arch=\"$arch\"" cargo +nightly hack clippy \
  21. --target "$target" \
  22. -Zbuild-std=core \
  23. --package aya-ebpf-bindings \
  24. --package aya-ebpf \
  25. --package aya-log-ebpf \
  26. --package integration-ebpf \
  27. --feature-powerset \
  28. -- --deny warnings
  29. done
  30. done