Fix coverage build for cpython (#2502)

This commit is contained in:
Ammar Askar 2019-06-11 11:25:01 -07:00 committed by Max Moroz
parent 2446d3bb5d
commit 88d9006f38
1 changed files with 10 additions and 0 deletions

View File

@ -34,3 +34,13 @@ do
$CXX $CXXFLAGS $WORK/$fuzz_test.o -o $OUT/$fuzz_test \
$LIB_FUZZING_ENGINE $($OUT/bin/python3-config --ldflags --embed)
done
# A little bit hacky but we have to copy $OUT/include to
# $OUT/$OUT/include as the coverage build needs all source
# files used in execution and expects it to be there.
# See projects/tensorflow/build.sh for prior art
if [ "$SANITIZER" = "coverage" ]
then
mkdir -p $OUT/$OUT
cp -r $OUT/include $OUT/$OUT/
fi