base: Move lsan.h to base/sanitizer/

Bug: chromium:1056170
Change-Id: I470411540fc9d8beaaed52b7aed3c773b9b99b4b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2854739
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74243}
This commit is contained in:
Michael Lippautz 2021-04-27 20:36:42 +02:00 committed by Commit Bot
parent ec36abead2
commit 6181e5b7ca
2 changed files with 8 additions and 6 deletions

View File

@ -4589,7 +4589,6 @@ v8_component("v8_libbase") {
"src/base/lazy-instance.h",
"src/base/logging.cc",
"src/base/logging.h",
"src/base/lsan.h",
"src/base/macros.h",
"src/base/memory.h",
"src/base/once.cc",
@ -4618,6 +4617,7 @@ v8_component("v8_libbase") {
"src/base/sanitizer/asan.h",
"src/base/sanitizer/lsan-page-allocator.cc",
"src/base/sanitizer/lsan-page-allocator.h",
"src/base/sanitizer/lsan.h",
"src/base/sanitizer/msan.h",
"src/base/small-vector.h",
"src/base/sys-info.cc",

View File

@ -4,14 +4,16 @@
// LeakSanitizer support.
#ifndef V8_BASE_LSAN_H_
#define V8_BASE_LSAN_H_
#ifndef V8_BASE_SANITIZER_LSAN_H_
#define V8_BASE_SANITIZER_LSAN_H_
#include <type_traits>
// There is no compile time flag for LSan, to enable this whenever ASan is
#include "src/base/macros.h"
// There is no compile time flag for LSan, so enable this whenever ASan is
// enabled. Note that LSan can be used as part of ASan with 'detect_leaks=1'.
// On windows, LSan is not implemented yet, so disable it there.
// On Windows, LSan is not implemented yet, so disable it there.
#if defined(V8_USE_ADDRESS_SANITIZER) && !defined(V8_OS_WIN)
#include <sanitizer/lsan_interface.h>
@ -26,4 +28,4 @@
#endif // defined(V8_USE_ADDRESS_SANITIZER) && !defined(V8_OS_WIN)
#endif // V8_BASE_LSAN_H_
#endif // V8_BASE_SANITIZER_LSAN_H_