Add build support for iOS and NaCl for libperfetto.

We want to make it so TRACE_EVENT macros will work on all build
platforms that chromium supports. One way is to make libperfetto build for IOS
and NACL. This patch adds support build OS's for libperfetto and deals with any
current incompatibilities.

Another option we considered is to make a "minlibperfetto" that adds just enough
to ensure that protozero gets generated so includes can not be ifdef'd
in chromium, however this requires a bunch of things to move into minlibperfetto
including perfetto logging and base, which in the end is basically this patch.

Change-Id: Iae04fb7b139bdf4c191862aa8f7d1185015f2869
diff --git a/src/base/paged_memory_unittest.cc b/src/base/paged_memory_unittest.cc
index 97f1a74..06695d6 100644
--- a/src/base/paged_memory_unittest.cc
+++ b/src/base/paged_memory_unittest.cc
@@ -83,7 +83,7 @@
 
     // Next page shouldn't be mapped.
     ASSERT_FALSE(vm_test_utils::IsMapped(ptr_raw + kMappedSize, 4096));
-    EXPECT_DEATH({ ptr_raw[kMappedSize] = 'x'; }, ".*");
+    EXPECT_DEATH_IF_SUPPORTED({ ptr_raw[kMappedSize] = 'x'; }, ".*");
 
     // Commit the remaining pages.
     mem.EnsureCommitted(kSize);
@@ -119,7 +119,7 @@
 
 #if defined(ADDRESS_SANITIZER)
 TEST(PagedMemoryTest, AccessUncommittedMemoryTriggersASAN) {
-  EXPECT_DEATH(
+  EXPECT_DEATH_IF_SUPPORTED(
       {
         constexpr size_t kNumPages = 4096;
         constexpr size_t kSize = 4096 * kNumPages;
@@ -141,8 +141,8 @@
   PagedMemory mem = PagedMemory::Allocate(kSize);
   ASSERT_TRUE(mem.IsValid());
   volatile char* raw = reinterpret_cast<char*>(mem.Get());
-  EXPECT_DEATH({ raw[-1] = 'x'; }, ".*");
-  EXPECT_DEATH({ raw[kSize] = 'x'; }, ".*");
+  EXPECT_DEATH_IF_SUPPORTED({ raw[-1] = 'x'; }, ".*");
+  EXPECT_DEATH_IF_SUPPORTED({ raw[kSize] = 'x'; }, ".*");
 }
 
 // Disable this on: