diff options
| author | Alexey Samsonov <samsonov@google.com> | 2013-03-18 07:00:36 +0000 |
|---|---|---|
| committer | Alexey Samsonov <samsonov@google.com> | 2013-03-18 07:00:36 +0000 |
| commit | e1955b851d55189d8a0124ae19424ab7323370f9 (patch) | |
| tree | 39b95eeaa1ac293a178175fc6a775e78979edcc0 | |
| parent | f9dbbda5bc080f21b7226916b629c9352304d5ff (diff) | |
| download | bcm5719-llvm-e1955b851d55189d8a0124ae19424ab7323370f9.tar.gz bcm5719-llvm-e1955b851d55189d8a0124ae19424ab7323370f9.zip | |
[TSan] Makefiles: allow configurable paths to clang and FileCheck. Add -fno-rtti flag.
llvm-svn: 177247
| -rw-r--r-- | compiler-rt/lib/tsan/Makefile.old | 12 | ||||
| -rwxr-xr-x | compiler-rt/lib/tsan/lit_tests/test_output.sh | 9 | ||||
| -rw-r--r-- | compiler-rt/lib/tsan/rtl/Makefile.old | 2 |
3 files changed, 13 insertions, 10 deletions
diff --git a/compiler-rt/lib/tsan/Makefile.old b/compiler-rt/lib/tsan/Makefile.old index a492eab6e7b..6329bbb5e8d 100644 --- a/compiler-rt/lib/tsan/Makefile.old +++ b/compiler-rt/lib/tsan/Makefile.old @@ -1,13 +1,15 @@ DEBUG=0 LDFLAGS=-ldl -lpthread -pie -CXXFLAGS = -fPIE -g -Wall -Werror -DTSAN_DEBUG=$(DEBUG) -DSANITIZER_DEBUG=$(DEBUG) +CXXFLAGS = -fPIE -fno-rtti -g -Wall -Werror \ + -DGTEST_HAS_RTTI=0 -DTSAN_DEBUG=$(DEBUG) -DSANITIZER_DEBUG=$(DEBUG) +CLANG=clang # Silence warnings that Clang produces for gtest code. # Use -Wno-attributes so that gcc doesn't complain about unknown warning types. CXXFLAGS += -Wno-attributes ifeq ($(DEBUG), 0) CXXFLAGS += -O3 endif -ifeq ($(CXX), clang++) +ifeq ($(CXX), $(CLANG)++) CXXFLAGS+= -Wno-unused-private-field -Wno-static-in-inline -Wgnu endif @@ -54,16 +56,16 @@ test: libtsan tsan_test run: all (ulimit -s 8192; ./tsan_test) - ./lit_tests/test_output.sh + CC=$(CLANG) CXX=$(CLANG)++ ./lit_tests/test_output.sh presubmit: ../sanitizer_common/scripts/check_lint.sh # Debug build with clang. $(MAKE) -f Makefile.old clean - $(MAKE) -f Makefile.old run DEBUG=1 -j 16 CC=clang CXX=clang++ + $(MAKE) -f Makefile.old run DEBUG=1 -j 16 CC=$(CLANG) CXX=$(CLANG)++ # Release build with clang. $(MAKE) -f Makefile.old clean - $(MAKE) -f Makefile.old run DEBUG=0 -j 16 CC=clang CXX=clang++ + $(MAKE) -f Makefile.old run DEBUG=0 -j 16 CC=$(CLANG) CXX=$(CLANG)++ # Debug build with gcc $(MAKE) -f Makefile.old clean $(MAKE) -f Makefile.old run DEBUG=1 -j 16 CC=gcc CXX=g++ diff --git a/compiler-rt/lib/tsan/lit_tests/test_output.sh b/compiler-rt/lib/tsan/lit_tests/test_output.sh index d21c9a797ad..f4f8a5c8e0d 100755 --- a/compiler-rt/lib/tsan/lit_tests/test_output.sh +++ b/compiler-rt/lib/tsan/lit_tests/test_output.sh @@ -6,9 +6,10 @@ set -e # fail on any error ROOTDIR=$(dirname $0)/.. BLACKLIST=$ROOTDIR/lit_tests/Helpers/blacklist.txt -# Assuming clang is in path. -CC=clang -CXX=clang++ +# Assume clang and clang++ are in path. +: ${CC:=clang} +: ${CXX:=clang++} +: ${FILECHECK:=FileCheck} # TODO: add testing for all of -O0...-O3 CFLAGS="-fsanitize=thread -fsanitize-blacklist=$BLACKLIST -fPIE -O1 -g -fno-builtin -Wall" @@ -23,7 +24,7 @@ test_file() { $COMPILER $SRC $CFLAGS -c -o $OBJ $COMPILER $OBJ $LDFLAGS -o $EXE RES=$($EXE 2>&1 || true) - printf "%s\n" "$RES" | FileCheck $SRC + printf "%s\n" "$RES" | $FILECHECK $SRC if [ "$3" == "" ]; then rm -f $EXE $OBJ fi diff --git a/compiler-rt/lib/tsan/rtl/Makefile.old b/compiler-rt/lib/tsan/rtl/Makefile.old index f522ec6b47d..cf4121ee611 100644 --- a/compiler-rt/lib/tsan/rtl/Makefile.old +++ b/compiler-rt/lib/tsan/rtl/Makefile.old @@ -10,7 +10,7 @@ endif INTERCEPTION=../../interception COMMON=../../sanitizer_common INCLUDES= -I../.. -I../../../include -EXTRA_CXXFLAGS=-fno-exceptions +EXTRA_CXXFLAGS=-fno-exceptions -fno-rtti NO_SYSROOT=--sysroot=. CXXFLAGS+=$(EXTRA_CXXFLAGS) CXXFLAGS+=$(CFLAGS) |

