/rg/build/build-rg.sh

https://bitbucket.org/ndotfiles/tool-builds · Shell · 24 lines · 11 code · 8 blank · 5 comment · 0 complexity · 1215758bd12834ba86207d4fe510b684 MD5 · raw file

  1. #!/usr/bin/env bash
  2. set -x
  3. set -e
  4. source util.sh
  5. rg_version=0.8.0
  6. wget_archive_verified \
  7. https://github.com/BurntSushi/ripgrep/archive/$rg_version.tar.gz \
  8. ecdf0e52d71d2d89c7c3ba88e5648971517ceea52683a9ef63a49fd0a0ddf7de
  9. # This makes the binary be in a consistent location
  10. mv ripgrep-$rg_version ripgrep
  11. cd ripgrep
  12. # This is a generic build
  13. # cargo build --release
  14. # This build depends on having a recent Intel CPU and a Rust nightly release
  15. RUSTFLAGS="-C target-cpu=native" cargo build --release \
  16. --features 'simd-accel avx-accel'