| # Copyright 2018 The Chromium Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| component("client") { |
| output_name = "gwp_asan_client" |
| sources = [ |
| "crash_key.cc", |
| "crash_key.h", |
| "export.h", |
| "guarded_page_allocator.cc", |
| "guarded_page_allocator.h", |
| "guarded_page_allocator_win.cc", |
| "gwp_asan.cc", |
| "gwp_asan.h", |
| "sampling_allocator_shims.cc", |
| "sampling_allocator_shims.h", |
| ] |
| |
| if (is_posix) { |
| sources += [ "guarded_page_allocator_posix.cc" ] |
| } |
| |
| defines = [ "GWP_ASAN_IMPLEMENTATION" ] |
| |
| deps = [ |
| "//base", |
| "//base/allocator:buildflags", |
| "//components/crash/core/common:crash_key", |
| "//components/gwp_asan/common", |
| ] |
| } |
| |
| source_set("unit_tests") { |
| testonly = true |
| sources = [ |
| "guarded_page_allocator_unittest.cc", |
| "sampling_allocator_shims_unittest.cc", |
| ] |
| deps = [ |
| ":client", |
| "//base/allocator:buildflags", |
| "//base/test:test_support", |
| "//components/crash/core/common:crash_key", |
| "//components/gwp_asan/common", |
| "//testing/gtest", |
| ] |
| } |