diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 30af84c296..da5a7cd60d 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -48,6 +48,8 @@ jobs: profile: minimal toolchain: stable - uses: Swatinem/rust-cache@v1 + - name: set mold linker as default linker + uses: rui314/setup-mold@v1 - name: Install deps run: sudo apt-get install -y llvm llvm-dev clang ninja-build - name: get clang version @@ -107,6 +109,9 @@ jobs: with: profile: minimal toolchain: stable + - name: set mold linker as default linker + if: runner.os == 'Linux' # mold only support linux until now + uses: rui314/setup-mold@v1 - name: add ccache uses: hendrikmuhs/ccache-action@v1.2 with: diff --git a/scripts/test_all_fuzzers.sh b/scripts/test_all_fuzzers.sh index 8475964d6c..4c7fa2c0a3 100755 --- a/scripts/test_all_fuzzers.sh +++ b/scripts/test_all_fuzzers.sh @@ -12,8 +12,20 @@ libafl=$(pwd) git submodule init && git submodule update +# override default profile settings for speed +# export RUSTFLAGS="-C prefer-dynamic" +for profile in DEV RELEASE; # loop for all profiles +do + export CARGO_PROFILE_"$profile"_OPT_LEVEL=z # optimize for size + export CARGO_PROFILE_"$profile"_SPLIT_DEBUGINFO=unpacked # minimize debug info + # export CARGO_PROFILE_"$profile"_PANIC=abort + export CARGO_PROFILE_"$profile"_INCREMENTAL=true +done + # record time of each fuzzer declare -A time_record || (echo "declare -A not avaliable, please update your bash version to 4";exit 1) + + for fuzzer in $(echo $fuzzers $backtrace_fuzzers); do cd $fuzzer