Add the various sanitizers from the GYP setup

Everything doesn't build and many tests don't pass, but the basics are
there.

Change-Id: I6d1219077318d9e168a81d9c3f620a8f77c97c96
diff --git a/tools/cpp/BUILD b/tools/cpp/BUILD
index 9196d44..f6203eb 100644
--- a/tools/cpp/BUILD
+++ b/tools/cpp/BUILD
@@ -1,10 +1,17 @@
 package(default_visibility = ['//visibility:public'])
 
 cc_library(
+  name = 'empty_main',
+  srcs = [ 'empty_main.c' ],
+)
+
+cc_library(
   name = 'malloc',
-  deps = [
-    '//third_party/gperftools:tcmalloc',
-  ],
+  deps = select({
+    '//tools:has_asan': [],
+    '//tools:has_tsan': [],
+    '//conditions:default': ['//third_party/gperftools:tcmalloc'],
+  }),
 )
 
 cc_library(