提交 4508789f 编写于 作者: B Behdad Esfahbod

Add test for static initializers and other C++ stuff

上级 56bd259b
...@@ -190,8 +190,9 @@ indic_LDADD = libharfbuzz.la $(HBLIBS) ...@@ -190,8 +190,9 @@ indic_LDADD = libharfbuzz.la $(HBLIBS)
dist_check_SCRIPTS = \ dist_check_SCRIPTS = \
check-c-linkage-decls.sh \ check-c-linkage-decls.sh \
check-header-guards.sh \ check-header-guards.sh \
check-internal-symbols.sh \
check-includes.sh \ check-includes.sh \
check-internal-symbols.sh \
check-static-inits.sh \
$(NULL) $(NULL)
if HAVE_ICU if HAVE_ICU
......
#!/bin/sh
LC_ALL=C
export LC_ALL
test -z "$srcdir" && srcdir=.
stat=0
if which objdump 2>/dev/null >/dev/null; then
:
else
echo "check-static-inits.sh: 'objdump' not found; skipping test"
exit 77
fi
echo "Checking that no object file has static initializers"
for obj in .libs/*.o; do
if objdump -t "$obj" | grep '[.]ctors'; then
echo "Ouch, $obj has static initializers"
stat=1
fi
done
echo "Checking that no object file has lazy static C++ constructors/destructors"
for obj in .libs/*.o; do
if objdump -t "$obj" | grep '__c'; then
echo "Ouch, $obj has lazy static C++ constructors/destructors"
stat=1
fi
done
exit $stat
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册