GWP-ASan: Silence unnecessary warnings

When GWP-ASan is enabled with use_allocator_shim=false (e.g. Windows
component builds) it prints a diagnostic warning. Only enable GWP-ASan
if it can actually be initialized to avoid printing unnecessary
warnings.

This means we can't use enable_gwp_asan to enable running tests, as the
tests already test for use_allocator_shim=true when necessary.

Bug: 929878
Change-Id: I4a8aaaca80c0185fd1c5e07bd7692437665407d3
Reviewed-on: https://chromium-review.googlesource.com/c/1460192
Auto-Submit: Vlad Tsyrklevich <vtsyrklevich@chromium.org>
Commit-Queue: Vitaly Buka <vitalybuka@chromium.org>
Reviewed-by: Vitaly Buka <vitalybuka@chromium.org>
Cr-Commit-Position: refs/heads/master@{#630543}
2 files changed