Add arg for profile in build.sh (#1680)

This commit is contained in:
Addison Crump 2023-11-21 04:15:53 +01:00 committed by GitHub
parent 281524dbf9
commit 86cb187ef1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,9 +1,17 @@
#!/bin/bash #!/bin/bash
set -e
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
cd "${SCRIPT_DIR}" || exit 1 cd "${SCRIPT_DIR}" || exit 1
if [ -z ${1+x} ]; then
profile=release
else
profile="$1"
fi
if ! cargo +nightly --version >& /dev/null; then if ! cargo +nightly --version >& /dev/null; then
echo -e "You must install a recent Rust nightly to build the libafl_libfuzzer runtime!" echo -e "You must install a recent Rust nightly to build the libafl_libfuzzer runtime!"
exit 1 exit 1
@ -18,7 +26,7 @@ if ! [ -f "${RUST_LLD}" ] && [ -f "${RUST_AR}" ]; then
exit 1 exit 1
fi fi
cargo +nightly build --release cargo +nightly build --profile "$profile"
tmpdir="" tmpdir=""