afl: fix afl-clang-fast++ by making it a copy of afl-clang-fast, not a symlink

a symlink gets skipped by wrapProgram and this ends up confusing the nix
cc wrapper's cpp mode detection
This commit is contained in:
Robert Scott 2020-04-18 23:18:41 +01:00 committed by Austin Seipp
parent 1ca6909514
commit 1985c6b9d5
1 changed files with 5 additions and 0 deletions

View File

@ -47,6 +47,11 @@ let
# has totally different semantics in that case(?) - and also set a
# proper AFL_CC and AFL_CXX so we don't pick up the wrong one out
# of $PATH.
# first though we need to replace the afl-clang-fast++ symlink with
# a real copy to prevent wrapProgram skipping the symlink and confusing
# nix's cc wrapper
rm $out/bin/afl-clang-fast++
cp $out/bin/afl-clang-fast $out/bin/afl-clang-fast++
for x in $out/bin/afl-clang-fast $out/bin/afl-clang-fast++; do
wrapProgram $x \
--prefix AFL_PATH : "$out/lib/afl" \