forked from OSchip/llvm-project
tsan: don't check libc dependency on FreeBSD
This check fails on FreeBSD: https://github.com/golang/go/issues/14481#issuecomment-607471193 It is meant to prevent regressions, so disable it on FreeBSD.
This commit is contained in:
parent
2a645abe93
commit
0fb8a53562
|
@ -66,6 +66,10 @@ if [ "`uname -a | grep Linux`" != "" ]; then
|
|||
ARCHCFLAGS=""
|
||||
fi
|
||||
elif [ "`uname -a | grep FreeBSD`" != "" ]; then
|
||||
# The resulting object still depends on libc.
|
||||
# We removed this dependency for Go runtime for other OSes,
|
||||
# and we should remove it for FreeBSD as well, but there is no pressing need.
|
||||
DEPENDS_ON_LIBC=1
|
||||
SUFFIX="freebsd_amd64"
|
||||
OSCFLAGS="-fno-strict-aliasing -fPIC -Werror"
|
||||
ARCHCFLAGS="-m64"
|
||||
|
@ -172,10 +176,12 @@ $CC $DIR/gotsan.cpp -c -o $DIR/race_$SUFFIX.syso $FLAGS $CFLAGS
|
|||
|
||||
$CC $OSCFLAGS $ARCHCFLAGS test.c $DIR/race_$SUFFIX.syso -g -o $DIR/test $OSLDFLAGS $LDFLAGS
|
||||
|
||||
# Verify that no glibc specific code is present
|
||||
if nm $DIR/race_$SUFFIX.syso | grep -q __libc_; then
|
||||
printf -- '%s seems to link to libc\n' "race_$SUFFIX.syso"
|
||||
exit 1
|
||||
# Verify that no libc specific code is present.
|
||||
if [ "$DEPENDS_ON_LIBC" != "1" ]; then
|
||||
if nm $DIR/race_$SUFFIX.syso | grep -q __libc_; then
|
||||
printf -- '%s seems to link to libc\n' "race_$SUFFIX.syso"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
export GORACE="exitcode=0 atexit_sleep_ms=0"
|
||||
|
|
Loading…
Reference in New Issue