1
0

bindgen-all-the-things 791 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/usr/bin/env bash
  2. # Copyright 2022 The ChromiumOS Authors
  3. # Use of this source code is governed by a BSD-style license that can be
  4. # found in the LICENSE file.
  5. #
  6. # Regenerate all bindgen-generated Rust bindings in the crosvm tree.
  7. #
  8. # This script expects to be executed from a full ChromeOS checkout so it has access to the kernel
  9. # and other repositories. Note that it must be run from OUTSIDE the chroot.
  10. set -e
  11. cd "$(dirname "${BASH_SOURCE[0]}")/.."
  12. source tools/impl/bindgen-common.sh
  13. die() {
  14. echo "$@"
  15. exit 1
  16. }
  17. dirs=(
  18. io_uring
  19. kernel_loader
  20. kvm_sys
  21. media/libvda
  22. net_sys
  23. vfio_sys
  24. virtio_sys
  25. vm_memory
  26. )
  27. for d in "${dirs[@]}"; do
  28. echo "bindgen ${d}"
  29. "${d}"/bindgen.sh || die "Failed to generate bindings for ${d}"
  30. done
  31. echo "Done!"