You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
425 B

#!/bin/bash -ex
# Usage:
#
# ./update-libfuzzer $commit_hash
#
# Where `$commit_hash` is a commit hash from
# https://github.com/llvm-mirror/llvm-project
set -ex
cd "$(dirname $0)"
project_dir="$(pwd)"
tmp_dir="$(mktemp -d)"
git clone https://github.com/llvm/llvm-project.git "$tmp_dir"
cd "$tmp_dir"
git checkout "$1"
rm -rf "$project_dir/libfuzzer/"
mv "$tmp_dir/compiler-rt/lib/fuzzer/" "$project_dir/libfuzzer/"