Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 1 | licenses(["notice"]) |
Brian Silverman | 660d609 | 2015-11-26 18:41:59 -0500 | [diff] [blame] | 2 | |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 3 | load("//tools/build_rules:select.bzl", "cpu_select", "compiler_select") |
| 4 | load("//tools/build_rules:empty_main.bzl", "empty_main_if_asan") |
Brian Silverman | 660d609 | 2015-11-26 18:41:59 -0500 | [diff] [blame] | 5 | |
| 6 | common_copts = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 7 | #Stuff from their Makefile. |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 8 | "-Wno-cast-align", |
| 9 | "-Wno-sign-compare", |
| 10 | "-fno-builtin-malloc", |
| 11 | "-fno-builtin-free", |
| 12 | "-fno-builtin-realloc", |
| 13 | "-fno-builtin-calloc", |
| 14 | "-fno-builtin-cfree", |
| 15 | "-fno-builtin-memalign", |
| 16 | "-fno-builtin-posix_memalign", |
| 17 | "-fno-builtin-valloc", |
| 18 | "-fno-builtin-pvalloc", |
| 19 | "-Wno-unused-result", |
| 20 | "-fno-omit-frame-pointer", |
| 21 | "-DNDEBUG", |
Brian Silverman | 660d609 | 2015-11-26 18:41:59 -0500 | [diff] [blame] | 22 | |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 23 | #Stuff to make it work for us. |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 24 | "-Ithird_party/gperftools/src/", |
| 25 | "-Ithird_party/empty_config_h", |
| 26 | "-Wno-unused-parameter", |
| 27 | "-Wno-missing-field-initializers", |
| 28 | "-Wno-unused-function", |
| 29 | "-Wno-unused-variable", |
| 30 | "-Wno-format-nonliteral", |
| 31 | "-Wno-switch-enum", |
| 32 | "-Wno-error=cast-align", |
| 33 | "-Wno-error=cast-qual", |
Brian Silverman | 660d609 | 2015-11-26 18:41:59 -0500 | [diff] [blame] | 34 | |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 35 | #Stuff pulled out of config.h. |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 36 | "-DHAVE_BUILTIN_EXPECT=1", |
| 37 | "-DHAVE_DECL_CFREE=1", |
| 38 | "-DHAVE_DECL_MEMALIGN=1", |
| 39 | "-DHAVE_DECL_POSIX_MEMALIGN=1", |
| 40 | "-DHAVE_DECL_PVALLOC=1", |
| 41 | "-DHAVE_DECL_UNAME=1", |
| 42 | "-DHAVE_DECL_VALLOC=1", |
| 43 | "-DHAVE_DLFCN_H=1", |
| 44 | "-DHAVE_ELF32_VERSYM=1", |
| 45 | "-DHAVE_EXECINFO_H=1", |
| 46 | "-DHAVE_FCNTL_H=1", |
| 47 | "-DHAVE_FEATURES_H=1", |
| 48 | "-DHAVE_FORK=1", |
| 49 | "-DHAVE_GETEUID=1", |
| 50 | "-DHAVE_GLOB_H=1", |
| 51 | "-DHAVE_GRP_H=1", |
| 52 | "-DHAVE_INTTYPES_H=1", |
| 53 | "-DHAVE_LINUX_PTRACE_H=1", |
| 54 | "-DHAVE_LINUX_SIGEV_THREAD_ID=1", |
| 55 | "-DHAVE_MALLOC_H=1", |
| 56 | "-DHAVE_MEMORY_H=1", |
| 57 | "-DHAVE_MMAP=1", |
| 58 | "-DHAVE_NAMESPACES=1", |
| 59 | "-DHAVE_POLL_H=1", |
| 60 | "-DHAVE_PROGRAM_INVOCATION_NAME=1", |
| 61 | "-DHAVE_PTHREAD=1", |
| 62 | "-DHAVE_PWD_H=1", |
| 63 | "-DHAVE_SBRK=1", |
| 64 | "-DHAVE_SCHED_H=1", |
| 65 | "-DHAVE_STDINT_H=1", |
| 66 | "-DHAVE_STDLIB_H=1", |
| 67 | "-DHAVE_STRINGS_H=1", |
| 68 | "-DHAVE_STRING_H=1", |
| 69 | "-DHAVE_STRUCT_MALLINFO=1", |
| 70 | "-DHAVE_SYS_CDEFS_H=1", |
| 71 | "-DHAVE_SYS_PRCTL_H=1", |
| 72 | "-DHAVE_SYS_RESOURCE_H=1", |
| 73 | "-DHAVE_SYS_SOCKET_H=1", |
| 74 | "-DHAVE_SYS_STAT_H=1", |
| 75 | "-DHAVE_SYS_SYSCALL_H=1", |
| 76 | "-DHAVE_SYS_TYPES_H=1", |
| 77 | "-DHAVE_SYS_UCONTEXT_H=1", |
| 78 | "-DHAVE_SYS_WAIT_H=1", |
| 79 | "-DHAVE_TLS=1", |
| 80 | "-DHAVE_UCONTEXT_H=1", |
| 81 | "-DHAVE_UNISTD_H=1", |
| 82 | "-DHAVE_UNWIND_H=1", |
| 83 | "-DHAVE___ATTRIBUTE__=1", |
| 84 | "-DHAVE___ENVIRON=1", |
| 85 | "-DMALLOC_HOOK_MAYBE_VOLATILE=volatile", |
| 86 | "-DPERFTOOLS_DLL_DECL=", |
| 87 | "-DSTDC_HEADERS=1", |
| 88 | "-DSTL_NAMESPACE=std", |
| 89 | "-DPACKAGE_STRING=\\\"gperftools\ 2.4\\\"", |
johnp | 8a384f9 | 2019-01-03 13:10:00 -0800 | [diff] [blame] | 90 | "-DPACKAGE_BUGREPORT=\\\"http://www.frc971.org/contact\\\"", |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 91 | "-DPACKAGE_VERSION=\\\"2.4\\\"", |
Brian Silverman | 660d609 | 2015-11-26 18:41:59 -0500 | [diff] [blame] | 92 | ] + cpu_select({ |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 93 | "amd64": [ |
| 94 | "-DHAVE_GETPAGESZE=1", |
| 95 | "-DHAVE_SYS_PARAM_H=1", |
| 96 | "-DPC_FROM_UCONTEXT=uc_mcontext.gregs[REG_RIP]", |
| 97 | "-DPRIdS=\\\"ld\\\"", |
| 98 | "-DPRIuS=\\\"lu\\\"", |
| 99 | "-DPRIxS=\\\"lx\\\"", |
| 100 | ], |
| 101 | "arm": [ |
| 102 | "-DPC_FROM_UCONTEXT=uc_mcontext.arm_pc", |
| 103 | "-DPRIdS=\\\"d\\\"", |
| 104 | "-DPRIuS=\\\"u\\\"", |
| 105 | "-DPRIxS=\\\"x\\\"", |
| 106 | ], |
Brian Silverman | 660d609 | 2015-11-26 18:41:59 -0500 | [diff] [blame] | 107 | }) + compiler_select({ |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 108 | "clang": [ |
| 109 | "-Wno-unused-const-variable", |
| 110 | "-Wno-gnu-alignof-expression", |
| 111 | "-Wno-unused-private-field", |
| 112 | ], |
| 113 | "gcc": [], |
Brian Silverman | 660d609 | 2015-11-26 18:41:59 -0500 | [diff] [blame] | 114 | }) |
| 115 | |
| 116 | cc_library( |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 117 | name = "tcmalloc", |
| 118 | srcs = glob( |
| 119 | include = [ |
| 120 | "src/*.cc", |
| 121 | "src/*.c", |
| 122 | "src/base/*.cc", |
| 123 | "src/base/*.c", |
| 124 | ], |
| 125 | exclude = [ |
| 126 | "**/*_unittest.cc", |
| 127 | "**/*_test.cc", |
| 128 | "src/debugallocation.cc", |
| 129 | ], |
| 130 | ), |
| 131 | hdrs = glob([ |
| 132 | "src/*.h", |
| 133 | "src/base/*.h", |
| 134 | "src/gperftools/*.h", |
| 135 | ]) + [ |
| 136 | "src/third_party/valgrind.h", |
| 137 | ], |
| 138 | copts = common_copts, |
| 139 | linkopts = [ |
| 140 | "-lrt", |
| 141 | "-lpthread", |
| 142 | ], |
| 143 | nocopts = "-std=gnu\+\+1y", |
| 144 | visibility = ["//visibility:public"], |
| 145 | deps = [ |
| 146 | "//third_party/empty_config_h", |
| 147 | ], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 148 | includes = ["src"], |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 149 | alwayslink = True, |
Brian Silverman | 660d609 | 2015-11-26 18:41:59 -0500 | [diff] [blame] | 150 | ) |
| 151 | |
| 152 | cc_library( |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 153 | name = "testutil", |
| 154 | srcs = [ |
| 155 | "src/tests/testutil.cc", |
Brian Silverman | 660d609 | 2015-11-26 18:41:59 -0500 | [diff] [blame] | 156 | ], |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 157 | hdrs = [ |
| 158 | "src/tests/testutil.h", |
| 159 | ], |
| 160 | copts = common_copts, |
| 161 | deps = [ |
| 162 | ":tcmalloc", |
| 163 | ], |
Brian Silverman | 660d609 | 2015-11-26 18:41:59 -0500 | [diff] [blame] | 164 | ) |
| 165 | |
| 166 | cc_test( |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 167 | name = "low_level_alloc_unittest", |
| 168 | size = "medium", |
| 169 | srcs = [ |
| 170 | "src/tests/low_level_alloc_unittest.cc", |
| 171 | ], |
| 172 | copts = common_copts, |
| 173 | defines = [ |
| 174 | "NO_TCMALLOC_SAMPLES", |
| 175 | ], |
| 176 | deps = [ |
| 177 | ":tcmalloc", |
| 178 | ], |
Brian Silverman | 660d609 | 2015-11-26 18:41:59 -0500 | [diff] [blame] | 179 | ) |
| 180 | |
| 181 | cc_test( |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 182 | name = "atomicops_unittest", |
| 183 | size = "small", |
| 184 | srcs = [ |
| 185 | "src/tests/atomicops_unittest.cc", |
| 186 | ], |
| 187 | copts = common_copts, |
| 188 | deps = [ |
| 189 | ":tcmalloc", |
| 190 | ], |
Brian Silverman | 660d609 | 2015-11-26 18:41:59 -0500 | [diff] [blame] | 191 | ) |
| 192 | |
| 193 | cc_test( |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 194 | name = "stacktrace_unittest", |
| 195 | size = "small", |
| 196 | srcs = [ |
| 197 | "src/tests/stacktrace_unittest.cc", |
| 198 | ], |
| 199 | copts = common_copts, |
| 200 | deps = [ |
| 201 | ":tcmalloc", |
| 202 | ], |
Brian Silverman | 660d609 | 2015-11-26 18:41:59 -0500 | [diff] [blame] | 203 | ) |
| 204 | |
| 205 | cc_test( |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 206 | name = "tcmalloc_unittest", |
| 207 | size = "small", |
| 208 | srcs = empty_main_if_asan([ |
| 209 | "src/tests/tcmalloc_unittest.cc", |
| 210 | ]), |
| 211 | copts = common_copts + [ |
| 212 | "-fno-builtin", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 213 | #Add this back in when we upgrade clang. |
| 214 | #'-Wno-mismatched-new-delete', |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 215 | ], |
| 216 | deps = [ |
| 217 | ":tcmalloc", |
| 218 | ":testutil", |
| 219 | ], |
Brian Silverman | 660d609 | 2015-11-26 18:41:59 -0500 | [diff] [blame] | 220 | ) |
| 221 | |
| 222 | cc_test( |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 223 | name = "tcmalloc_large_unittest", |
| 224 | size = "small", |
| 225 | srcs = empty_main_if_asan([ |
| 226 | "src/tests/tcmalloc_large_unittest.cc", |
| 227 | ]), |
| 228 | copts = common_copts + [ |
| 229 | "-fno-builtin", |
| 230 | ], |
| 231 | deps = [ |
| 232 | ":tcmalloc", |
| 233 | ], |
Brian Silverman | 660d609 | 2015-11-26 18:41:59 -0500 | [diff] [blame] | 234 | ) |
| 235 | |
| 236 | cc_test( |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 237 | name = "addressmap_unittest", |
| 238 | size = "medium", |
| 239 | srcs = [ |
| 240 | "src/tests/addressmap_unittest.cc", |
| 241 | ], |
| 242 | copts = common_copts, |
| 243 | deps = [ |
| 244 | ":tcmalloc", |
| 245 | ], |
Brian Silverman | 660d609 | 2015-11-26 18:41:59 -0500 | [diff] [blame] | 246 | ) |
| 247 | |
| 248 | cc_test( |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 249 | name = "system_alloc_unittest", |
| 250 | size = "small", |
| 251 | srcs = empty_main_if_asan([ |
| 252 | "src/tests/system-alloc_unittest.cc", |
| 253 | ]), |
| 254 | copts = common_copts + [ |
| 255 | "-fno-builtin", |
| 256 | ], |
| 257 | deps = [ |
| 258 | ":tcmalloc", |
| 259 | ], |
Brian Silverman | 660d609 | 2015-11-26 18:41:59 -0500 | [diff] [blame] | 260 | ) |
| 261 | |
| 262 | cc_test( |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 263 | name = "packed_cache_test", |
| 264 | size = "small", |
| 265 | srcs = [ |
| 266 | "src/tests/packed-cache_test.cc", |
| 267 | ], |
| 268 | copts = common_copts, |
| 269 | deps = [ |
| 270 | ":tcmalloc", |
| 271 | ], |
Brian Silverman | 660d609 | 2015-11-26 18:41:59 -0500 | [diff] [blame] | 272 | ) |
| 273 | |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 274 | cc_test( |
| 275 | name = "frag_unittest", |
| 276 | size = "small", |
| 277 | srcs = [ |
| 278 | "src/tests/frag_unittest.cc", |
| 279 | ], |
| 280 | copts = common_copts, |
| 281 | deps = [ |
| 282 | ":tcmalloc", |
| 283 | ], |
| 284 | ) |
| 285 | |
| 286 | cc_test( |
| 287 | name = "markidle_unittest", |
| 288 | size = "small", |
| 289 | srcs = empty_main_if_asan([ |
| 290 | "src/tests/markidle_unittest.cc", |
| 291 | ]), |
| 292 | copts = common_copts, |
| 293 | deps = [ |
| 294 | ":tcmalloc", |
| 295 | ":testutil", |
| 296 | ], |
| 297 | ) |
| 298 | |
| 299 | cc_test( |
| 300 | name = "current_allocated_bytes_test", |
| 301 | size = "small", |
| 302 | srcs = [ |
| 303 | "src/tests/current_allocated_bytes_test.cc", |
| 304 | ], |
| 305 | copts = common_copts, |
| 306 | deps = [ |
| 307 | ":tcmalloc", |
| 308 | ], |
| 309 | ) |
| 310 | |
| 311 | cc_test( |
| 312 | name = "malloc_hook_test", |
| 313 | size = "small", |
| 314 | srcs = [ |
| 315 | "src/tests/malloc_hook_test.cc", |
| 316 | ], |
| 317 | copts = common_copts + compiler_select({ |
| 318 | "gcc": [ |
| 319 | "-Wno-maybe-uninitialized", |
| 320 | ], |
| 321 | "clang": [], |
| 322 | }), |
| 323 | deps = [ |
| 324 | ":tcmalloc", |
| 325 | ":testutil", |
| 326 | ], |
| 327 | ) |
| 328 | |
| 329 | cc_test( |
| 330 | name = "malloc_extension_test", |
| 331 | size = "small", |
| 332 | srcs = empty_main_if_asan([ |
| 333 | "src/tests/malloc_extension_test.cc", |
| 334 | ]), |
| 335 | copts = common_copts, |
| 336 | deps = [ |
| 337 | ":tcmalloc", |
| 338 | ], |
| 339 | ) |
| 340 | |
| 341 | cc_test( |
| 342 | name = "malloc_extension_c_test", |
| 343 | size = "small", |
| 344 | srcs = empty_main_if_asan([ |
| 345 | "src/tests/malloc_extension_c_test.c", |
| 346 | ]), |
| 347 | copts = common_copts, |
| 348 | deps = [ |
| 349 | ":tcmalloc", |
| 350 | ], |
| 351 | ) |
| 352 | |
| 353 | cc_test( |
| 354 | name = "memalign_unittest", |
| 355 | size = "small", |
| 356 | srcs = empty_main_if_asan([ |
| 357 | "src/tests/memalign_unittest.cc", |
| 358 | ]), |
| 359 | copts = common_copts, |
| 360 | deps = [ |
| 361 | ":tcmalloc", |
| 362 | ":testutil", |
| 363 | ], |
| 364 | ) |
| 365 | |
| 366 | cc_test( |
| 367 | name = "page_heap_test", |
| 368 | size = "small", |
| 369 | srcs = [ |
| 370 | "src/tests/page_heap_test.cc", |
| 371 | ], |
| 372 | copts = common_copts, |
| 373 | deps = [ |
| 374 | ":tcmalloc", |
| 375 | ], |
| 376 | ) |
| 377 | |
| 378 | cc_test( |
| 379 | name = "pagemap_unittest", |
| 380 | size = "small", |
| 381 | srcs = empty_main_if_asan([ |
| 382 | "src/tests/pagemap_unittest.cc", |
| 383 | ]), |
| 384 | copts = common_copts, |
| 385 | deps = [ |
| 386 | ":tcmalloc", |
| 387 | ], |
| 388 | ) |
| 389 | |
| 390 | cc_test( |
| 391 | name = "realloc_unittest", |
| 392 | size = "small", |
| 393 | srcs = [ |
| 394 | "src/tests/realloc_unittest.cc", |
| 395 | ], |
| 396 | copts = common_copts, |
| 397 | deps = [ |
| 398 | ":tcmalloc", |
| 399 | ], |
| 400 | ) |
| 401 | |
| 402 | cc_test( |
| 403 | name = "stack_trace_table_test", |
| 404 | size = "small", |
| 405 | srcs = [ |
| 406 | "src/tests/stack_trace_table_test.cc", |
| 407 | ], |
| 408 | copts = common_copts, |
| 409 | deps = [ |
| 410 | ":tcmalloc", |
| 411 | ], |
| 412 | ) |
| 413 | |
| 414 | cc_test( |
| 415 | name = "thread_dealloc_unittest", |
| 416 | size = "small", |
| 417 | srcs = [ |
| 418 | "src/tests/thread_dealloc_unittest.cc", |
| 419 | ], |
| 420 | copts = common_copts, |
| 421 | deps = [ |
| 422 | ":tcmalloc", |
| 423 | ":testutil", |
| 424 | ], |
| 425 | ) |
| 426 | |
| 427 | """ |
Brian Silverman | 660d609 | 2015-11-26 18:41:59 -0500 | [diff] [blame] | 428 | We don't build this because it actually needs to be in a separate binary. |
| 429 | cc_test( |
| 430 | name = 'debugallocation_test', |
| 431 | srcs = [ |
| 432 | 'src/tests/debugallocation_test.cc', |
| 433 | ], |
| 434 | deps = [ |
| 435 | ':tcmalloc', |
| 436 | ], |
| 437 | copts = common_copts, |
| 438 | size = 'small', |
| 439 | ) |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 440 | """ |
Brian Silverman | 660d609 | 2015-11-26 18:41:59 -0500 | [diff] [blame] | 441 | |
| 442 | cc_test( |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 443 | name = "tcmalloc_large_heap_fragmentation_unittest", |
| 444 | size = "small", |
| 445 | srcs = empty_main_if_asan([ |
| 446 | "src/tests/large_heap_fragmentation_unittest.cc", |
| 447 | ]), |
| 448 | copts = common_copts, |
| 449 | deps = [ |
| 450 | ":tcmalloc", |
| 451 | ], |
Brian Silverman | 660d609 | 2015-11-26 18:41:59 -0500 | [diff] [blame] | 452 | ) |
| 453 | |
| 454 | cc_test( |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 455 | name = "raw_printer_test", |
| 456 | size = "small", |
| 457 | srcs = [ |
| 458 | "src/tests/raw_printer_test.cc", |
| 459 | ], |
| 460 | copts = common_copts, |
| 461 | deps = [ |
| 462 | ":tcmalloc", |
| 463 | ], |
Brian Silverman | 660d609 | 2015-11-26 18:41:59 -0500 | [diff] [blame] | 464 | ) |
| 465 | |
| 466 | cc_test( |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 467 | name = "getpc_test", |
| 468 | size = "small", |
| 469 | srcs = empty_main_if_asan([ |
| 470 | "src/tests/getpc_test.cc", |
| 471 | ]), |
| 472 | copts = common_copts, |
| 473 | deps = [ |
| 474 | ":tcmalloc", |
| 475 | ], |
Brian Silverman | 660d609 | 2015-11-26 18:41:59 -0500 | [diff] [blame] | 476 | ) |
| 477 | |
| 478 | cc_test( |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 479 | name = "profiledata_unittest", |
| 480 | size = "small", |
| 481 | srcs = [ |
| 482 | "src/tests/profiledata_unittest.cc", |
| 483 | ], |
| 484 | copts = common_copts, |
| 485 | deps = [ |
| 486 | ":tcmalloc", |
| 487 | ], |
Brian Silverman | 660d609 | 2015-11-26 18:41:59 -0500 | [diff] [blame] | 488 | ) |
| 489 | |
| 490 | cc_test( |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 491 | name = "profile_handler_unittest", |
| 492 | size = "small", |
| 493 | srcs = [ |
| 494 | "src/tests/profile-handler_unittest.cc", |
| 495 | ], |
| 496 | copts = common_copts, |
| 497 | flaky = True, |
| 498 | deps = [ |
| 499 | ":tcmalloc", |
| 500 | ], |
Brian Silverman | 660d609 | 2015-11-26 18:41:59 -0500 | [diff] [blame] | 501 | ) |
| 502 | |
| 503 | cc_test( |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 504 | name = "heap_profiler_unittest", |
| 505 | size = "small", |
| 506 | srcs = [ |
| 507 | "src/tests/heap-profiler_unittest.cc", |
| 508 | ], |
| 509 | copts = common_copts, |
| 510 | deps = [ |
| 511 | ":tcmalloc", |
| 512 | ], |
Brian Silverman | 660d609 | 2015-11-26 18:41:59 -0500 | [diff] [blame] | 513 | ) |
| 514 | |
| 515 | cc_test( |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 516 | name = "sampler_test", |
| 517 | size = "small", |
| 518 | srcs = [ |
| 519 | "src/tests/sampler_test.cc", |
| 520 | ], |
| 521 | copts = common_copts + [ |
| 522 | "-Wno-type-limits", |
| 523 | ], |
| 524 | deps = [ |
| 525 | ":tcmalloc", |
| 526 | ], |
Brian Silverman | 660d609 | 2015-11-26 18:41:59 -0500 | [diff] [blame] | 527 | ) |