diff options
Diffstat (limited to 'src/base/watchdog_posix.cc')
-rw-r--r-- | src/base/watchdog_posix.cc | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/src/base/watchdog_posix.cc b/src/base/watchdog_posix.cc index 401ecdba5..dd68455f9 100644 --- a/src/base/watchdog_posix.cc +++ b/src/base/watchdog_posix.cc @@ -14,9 +14,16 @@ * limitations under the License. */ -#include "perfetto/ext/base/watchdog.h" +#include "perfetto/base/build_config.h" + +// Watchdog is currently not supported on Mac. This ifdef-based exclusion is +// here only for the Mac build in AOSP. The standalone and chromium builds +// exclude this file at the GN level. However, propagating the per-os exclusion +// through our GN -> BP build file translator is not worth the effort for a +// one-off case. +#if !PERFETTO_BUILDFLAG(PERFETTO_OS_MACOSX) -#if PERFETTO_BUILDFLAG(PERFETTO_WATCHDOG) +#include "perfetto/base/watchdog_posix.h" #include <fcntl.h> #include <inttypes.h> @@ -28,8 +35,12 @@ #include "perfetto/base/build_config.h" #include "perfetto/base/logging.h" -#include "perfetto/ext/base/scoped_file.h" -#include "perfetto/ext/base/thread_utils.h" +#include "perfetto/base/scoped_file.h" +#include "perfetto/base/thread_utils.h" + +#if PERFETTO_BUILDFLAG(PERFETTO_EMBEDDER_BUILD) +#error perfetto::base::Watchdog should not be used in Chromium or embedders +#endif namespace perfetto { namespace base { @@ -259,4 +270,4 @@ Watchdog::Timer::Timer(Timer&& other) noexcept { } // namespace base } // namespace perfetto -#endif // PERFETTO_BUILDFLAG(PERFETTO_WATCHDOG) +#endif // PERFETTO_OS_MACOSX |