qa.sh: Add ncc/nccnav support
This commit is contained in:
parent
5a912171fd
commit
93acfa0bb3
25
expat/qa.sh
25
expat/qa.sh
@ -9,8 +9,10 @@ set -o nounset
|
|||||||
: ${CLANG_CC:=clang}
|
: ${CLANG_CC:=clang}
|
||||||
: ${CLANG_CXX:=clang++}
|
: ${CLANG_CXX:=clang++}
|
||||||
|
|
||||||
|
: ${AR:=ar}
|
||||||
: ${CC:="${CLANG_CC}"}
|
: ${CC:="${CLANG_CC}"}
|
||||||
: ${CXX:="${CLANG_CXX}"}
|
: ${CXX:="${CLANG_CXX}"}
|
||||||
|
: ${LD:=ld}
|
||||||
: ${MAKE:=make}
|
: ${MAKE:=make}
|
||||||
|
|
||||||
: ${BASE_FLAGS:="-pipe -Wall -Wextra -pedantic -Wno-overlength-strings"}
|
: ${BASE_FLAGS:="-pipe -Wall -Wextra -pedantic -Wno-overlength-strings"}
|
||||||
@ -49,6 +51,13 @@ main() {
|
|||||||
# http://clang.llvm.org/docs/MemorySanitizer.html
|
# http://clang.llvm.org/docs/MemorySanitizer.html
|
||||||
BASE_FLAGS+=" -fsanitize=memory -fno-omit-frame-pointer -g -O2"
|
BASE_FLAGS+=" -fsanitize=memory -fno-omit-frame-pointer -g -O2"
|
||||||
;;
|
;;
|
||||||
|
ncc)
|
||||||
|
# http://students.ceid.upatras.gr/~sxanth/ncc/
|
||||||
|
local CC="ncc -ncgcc -ncld -ncfabs"
|
||||||
|
local AR=nccar
|
||||||
|
local LD=nccld
|
||||||
|
BASE_FLAGS+=" -fPIC"
|
||||||
|
;;
|
||||||
undefined)
|
undefined)
|
||||||
# http://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html
|
# http://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html
|
||||||
BASE_FLAGS+=" -fsanitize=undefined"
|
BASE_FLAGS+=" -fsanitize=undefined"
|
||||||
@ -56,7 +65,7 @@ main() {
|
|||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Usage:" 1>&2
|
echo "Usage:" 1>&2
|
||||||
echo " ${0##*/} (address|coverage|memory|undefined)" 1>&2
|
echo " ${0##*/} (address|coverage|memory|ncc|undefined)" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@ -69,16 +78,28 @@ main() {
|
|||||||
|
|
||||||
RUN CC="${CC}" CFLAGS="${CFLAGS}" \
|
RUN CC="${CC}" CFLAGS="${CFLAGS}" \
|
||||||
CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" \
|
CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" \
|
||||||
|
AR="${AR}" \
|
||||||
|
LD="${LD}" \
|
||||||
./configure "$@"
|
./configure "$@"
|
||||||
|
|
||||||
RUN "${MAKE}" clean all
|
RUN "${MAKE}" clean all
|
||||||
RUN "${MAKE}" check run-xmltest
|
|
||||||
|
case "${mode}" in
|
||||||
|
ncc)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
RUN "${MAKE}" check run-xmltest
|
||||||
|
;;
|
||||||
|
esac
|
||||||
) || exit 1
|
) || exit 1
|
||||||
|
|
||||||
case "${mode}" in
|
case "${mode}" in
|
||||||
coverage)
|
coverage)
|
||||||
find -name '*.gcda' | sort | xargs gcov
|
find -name '*.gcda' | sort | xargs gcov
|
||||||
;;
|
;;
|
||||||
|
ncc)
|
||||||
|
RUN nccnav ./.libs/libexpat.a.nccout
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user