diff options
Diffstat (limited to 'projects/cryptofuzz/build.sh')
-rwxr-xr-x | projects/cryptofuzz/build.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/projects/cryptofuzz/build.sh b/projects/cryptofuzz/build.sh index f73ff4e4..86ed037e 100755 --- a/projects/cryptofuzz/build.sh +++ b/projects/cryptofuzz/build.sh @@ -94,6 +94,28 @@ then make -B fi +# Compile SymCrypt +cd $SRC/SymCrypt/ +if [[ $CFLAGS != *sanitize=undefined* ]] +then + # Unittests don't build with clang and are not needed anyway + sed -i "s/^add_subdirectory(unittest)$//g" CMakeLists.txt + + mkdir b/ + cd b/ + cmake ../ + make -j$(nproc) + + export CXXFLAGS="$CXXFLAGS -DCRYPTOFUZZ_SYMCRYPT" + export SYMCRYPT_INCLUDE_PATH=$(realpath ../inc/) + export LIBSYMCRYPT_COMMON_A_PATH=$(realpath lib/x86_64/Generic/libsymcrypt_common.a) + export SYMCRYPT_GENERIC_A_PATH=$(realpath lib/x86_64/Generic/symcrypt_generic.a) + + # Compile Cryptofuzz SymCrypt module + cd $SRC/cryptofuzz/modules/symcrypt + make -B +fi + # Compile Cityhash cd $SRC/cityhash if [[ $CFLAGS != *-m32* ]] |