From 32b4b7f53e341be663438f69fd6cb2f909427188 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 22 Nov 2012 13:56:58 -0800 Subject: builtins.def (DEF_SANITIZER_BUILTIN): Define tsan builtins. 2012-11-22 Dmitry Vyukov Wei Mi * builtins.def (DEF_SANITIZER_BUILTIN): Define tsan builtins. * sanitizer.def: Ditto. * Makefile.in (tsan.o): Add tsan.o target. (BUILTINS_DEF): Add sanitizer.def. * passes.c (init_optimization_passes): Add tsan passes. * tree-pass.h (register_pass_info): Ditto. * toplev.c (compile_file): Ditto. * doc/invoke.texi: Document tsan related options. * gcc.c (LINK_COMMAND_SPEC): Add LIBTSAN_SPEC in link command if -fsanitize=thread. * tsan.c: New file about tsan. * tsan.h: Ditto. * common.opt: Add -fsanitize=thread. Co-Authored-By: Wei Mi From-SVN: r193736 --- gcc/toplev.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gcc/toplev.c') diff --git a/gcc/toplev.c b/gcc/toplev.c index fcdbd1a..d9d1127 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -73,6 +73,7 @@ along with GCC; see the file COPYING3. If not see #include "alloc-pool.h" #include "tree-mudflap.h" #include "asan.h" +#include "tsan.h" #include "gimple.h" #include "tree-ssa-alias.h" #include "plugin.h" @@ -575,6 +576,9 @@ compile_file (void) if (flag_asan) asan_finish_file (); + if (flag_tsan) + tsan_finish_file (); + output_shared_constant_pool (); output_object_blocks (); finish_tm_clone_pairs (); -- cgit v1.1