[fuchsia] Disable build warning.
Fuchsia has no mallinfo() or getrusage(). This silences the build
warnings.
Bug: chromium:921807
Change-Id: Ifbb274efdc99ebdf38a6b6b8760ffd42be6fafa4
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/31708
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Tested-by: Fabrice de Gans-Riberi <fdegans@chromium.org>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
diff --git a/third_party/llvm-subzero/lib/Support/Unix/Process.inc b/third_party/llvm-subzero/lib/Support/Unix/Process.inc
index 16f8f5a..b239046 100644
--- a/third_party/llvm-subzero/lib/Support/Unix/Process.inc
+++ b/third_party/llvm-subzero/lib/Support/Unix/Process.inc
@@ -65,7 +65,9 @@
::getrusage(RUSAGE_SELF, &RU);
return { toDuration(RU.ru_utime), toDuration(RU.ru_stime) };
#else
+#if !defined(__Fuchsia__)
#warning Cannot get usage times on this platform
+#endif
return { std::chrono::microseconds::zero(), std::chrono::microseconds::zero() };
#endif
}
@@ -107,7 +109,9 @@
return EndOfMemory - StartOfMemory;
return 0;
#else
+#if !defined(__Fuchsia__)
#warning Cannot get malloc info on this platform
+#endif
return 0;
#endif
}