Exclude watchdog_posix.cc in AOSP MAC builds

This CL #ifdefs out the watchdog code on AOSP mac builds.
Recently we started pulling this target also for host executables
but watchdog_posix.cc doesn't support Mac. This is not a problem
for GN-based builds, where we exclude the file on mac. In AOSP,
however, we don't propagate the Mac exclusion in the build system,
because that is too hard and not worth the effort.
Instead we just ifdef out the file on mac.

Change-Id: Ia85ed182f155ba5cb36aaba956c3e7ea60ed0800
diff --git a/src/base/watchdog_posix.cc b/src/base/watchdog_posix.cc
index 5f8755f..d8c064c 100644
--- a/src/base/watchdog_posix.cc
+++ b/src/base/watchdog_posix.cc
@@ -14,6 +14,15 @@
  * limitations under the License.
  */
 
+#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)
+
 #include "perfetto/base/watchdog_posix.h"
 
 #include "perfetto/base/logging.h"
@@ -254,3 +263,5 @@
 
 }  // namespace base
 }  // namespace perfetto
+
+#endif  // PERFETTO_OS_MACOSX