IVGCVSW-6707 Enables a bare metal compile

Change-Id: Icc2f83c5f27f413758fee3e5c1445e9fc44f42c8
Signed-off-by: Jim Flynn <jim.flynn@arm.com>
diff --git a/profiling/client/src/Holder.cpp b/profiling/client/src/Holder.cpp
index d144e24..2fee6f9 100644
--- a/profiling/client/src/Holder.cpp
+++ b/profiling/client/src/Holder.cpp
@@ -52,8 +52,9 @@
 
 CaptureData Holder::GetCaptureData() const
 {
+#if !defined(ARMNN_DISABLE_THREADS)
     std::lock_guard<std::mutex> lockGuard(m_CaptureThreadMutex);
-
+#endif
     return m_CaptureData;
 }
 
@@ -74,8 +75,9 @@
                             const std::vector<uint16_t>& counterIds,
                             const std::set<std::string>& activeBackends)
 {
+#if !defined(ARMNN_DISABLE_THREADS)
     std::lock_guard<std::mutex> lockGuard(m_CaptureThreadMutex);
-
+#endif
     m_CaptureData.SetCapturePeriod(capturePeriod);
     m_CaptureData.SetCounterIds(counterIds);
     m_CaptureData.SetActiveBackends(activeBackends);