More NaCL fixes for test_support.
Fix two more things to fix test_support on NaCL:
- Exclude test task runner code as UnixTaskRunner (its depedency) is not
available on NaCL.
- Disable -Wcomma warning which is not supported on NaCL.
R=skyostil@google.com
Change-Id: I36684a4dd7b5bf148b8a2d49a69cf49c91a9c68e
diff --git a/test/gtest_and_gmock.h b/test/gtest_and_gmock.h
index 90a8c85..82918d8 100644
--- a/test/gtest_and_gmock.h
+++ b/test/gtest_and_gmock.h
@@ -25,6 +25,8 @@
// 1 applies recursively also to the test translation units, 2 applies only
// to gmock/gtest includes.
+#include "perfetto/base/build_config.h"
+
#if defined(__GNUC__) // GCC & clang
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wundef"
@@ -36,7 +38,12 @@
#if defined(__clang__)
#pragma GCC diagnostic ignored "-Wshift-sign-overflow"
+
+#if !PERFETTO_BUILDFLAG(PERFETTO_OS_NACL)
+// -Wcomma isn't supported on NaCL.
#pragma GCC diagnostic ignored "-Wcomma"
+#endif // PERFETTO_OS_NACL
+
#endif
#include <gmock/gmock.h>