提交 7ddd0001 authored 作者: Iñaki Baz Castillo's avatar Iñaki Baz Castillo

Adding clang-fuzzer stuff (work in progress)

上级 8fec9c9f
......@@ -7,6 +7,9 @@
/worker/out/
/worker/**/*.xcodeproj/
# clang+fuzzer stuff is too big.
/worker/deps/clang-fuzzer
# Vim temporal files.
*.swp
*.swo
......@@ -41,6 +41,17 @@ test-Debug:
xcode:
cd worker && $(PYTHON) ./scripts/configure.py --format=xcode
build-fuzzer:
ifeq ($(DOCKER_NO_CACHE),true)
cd worker && docker build -f fuzzer/Dockerfile --no-cache --tag mediasoup/fuzzer:latest .
else
cd worker && docker build -f fuzzer/Dockerfile --tag mediasoup/fuzzer:latest .
endif
# TODO: Remove the volume. Not needed.
run-fuzzer:
cd worker/fuzzer && docker run --name=mediasoupFuzzer -v $(shell pwd)/worker/fuzzer/deleteme:/volume -it --rm mediasoup/fuzzer:latest
clean:
$(RM) -rf worker/out/Release/mediasoup-worker
$(RM) -rf worker/out/Release/obj.target/mediasoup-worker
......
......@@ -54,6 +54,7 @@
'-Wno-parentheses-equality',
],
},
'conditions':
[
[ 'target_arch == "ia32"', {
......@@ -66,7 +67,7 @@
'target_conditions':
[
[ '_type == "static_library"', {
'standalone_static_library': 1, # disable thin archive which needs binutils >= 2.19
'standalone_static_library': 1, # Disable thin archive which needs binutils >= 2.19
}]
],
'conditions':
......
......@@ -121,10 +121,31 @@ function get_lcov()
get_dep "${GIT_REPO}" "${GIT_TAG}" "${DEST}"
}
function get_clang_fuzzer()
{
NAME="clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04"
TAR_FILE="${NAME}.tar.xz"
TAR_URL="http://releases.llvm.org/7.0.0/${TAR_FILE}"
DEST="deps/clang-fuzzer"
set -x
rm -rf ${DEST}
mkdir ${DEST}
cd ${DEST}
mkdir bin lib
wget ${TAR_URL}
tar xfJ ${TAR_FILE}
rm -f ${TAR_FILE}
mv ${NAME}/bin/* bin/
mv ${NAME}/lib/clang lib/
rm -rf ${NAME}
}
case "${DEP}" in
'-h')
echo "Usage:"
echo " ./scripts/$(basename $0) [gyp|jsoncpp|netstring|libuv|openssl|libsrtp|catch|lcov]"
echo " ./scripts/$(basename $0) [gyp|jsoncpp|netstring|libuv|openssl|libsrtp|catch|lcov|clang-fuzzer]"
echo
;;
gyp)
......@@ -151,6 +172,9 @@ case "${DEP}" in
lcov)
get_lcov
;;
clang-fuzzer)
get_clang_fuzzer
;;
*)
echo ">>> [ERROR] unknown dep '${DEP}'" >&2
exit 1
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论