Fix mac build, make pipe_stats linux-only
Follow-up to a previous CL that introduced pipestats.
It doesn't work on Mac and it is useful only on Linux
host anyways. Surrounding its block with conditionals.
Bug: 76169489
Change-Id: I6cd920bb0dbe1507d54e082403f6cc1ab81ff62c
diff --git a/BUILD.gn b/BUILD.gn
index a5d896e..ca0943d 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -48,6 +48,9 @@
if (is_linux || is_android) {
deps += [ "tools/skippy" ]
}
+ if (is_linux) {
+ deps += [ "tools:pipestats" ]
+ }
}
}
@@ -59,11 +62,10 @@
"src/base:unittests",
"src/protozero:unittests",
]
+
# TODO(brucedawson): Enable these for Windows when possible.
if (!is_win) {
- deps += [
- "src/tracing:unittests",
- ]
+ deps += [ "src/tracing:unittests" ]
}
if (!build_with_chromium) {
deps += [
diff --git a/tools/BUILD.gn b/tools/BUILD.gn
index 1397d7e..85b2b6b 100644
--- a/tools/BUILD.gn
+++ b/tools/BUILD.gn
@@ -32,13 +32,15 @@
]
}
-executable("pipestats") {
- testonly = true
- sources = [
- "pipestats.cc",
- ]
- deps = [
- "../gn:default_deps",
- "../src/base",
- ]
+if (is_linux) {
+ executable("pipestats") {
+ testonly = true
+ sources = [
+ "pipestats.cc",
+ ]
+ deps = [
+ "../gn:default_deps",
+ "../src/base",
+ ]
+ }
}