IVGCVSW-6707 Enables a bare metal compile

Change-Id: Icc2f83c5f27f413758fee3e5c1445e9fc44f42c8
Signed-off-by: Jim Flynn <jim.flynn@arm.com>
diff --git a/profiling/common/include/ProfilingGuidGenerator.hpp b/profiling/common/include/ProfilingGuidGenerator.hpp
index bfee764..22a488d 100644
--- a/profiling/common/include/ProfilingGuidGenerator.hpp
+++ b/profiling/common/include/ProfilingGuidGenerator.hpp
@@ -26,7 +26,9 @@
     /// Return the next random Guid in the sequence
     inline ProfilingDynamicGuid NextGuid() override
     {
+#if !defined(ARMNN_DISABLE_THREADS)
         std::lock_guard<std::mutex> sequencelock(m_SequenceMutex);
+#endif
         ProfilingDynamicGuid guid(m_Sequence);
         m_Sequence++;
         if (m_Sequence >= MIN_STATIC_GUID)
@@ -47,14 +49,18 @@
     /// Reset the generator back to zero. Used mainly for test.
     inline void Reset()
     {
+#if !defined(ARMNN_DISABLE_THREADS)
         std::lock_guard<std::mutex> sequencelock(m_SequenceMutex);
+#endif
         m_Sequence = 0;
     }
 
 private:
     std::hash<std::string> m_Hash;
     uint64_t m_Sequence;
+#if !defined(ARMNN_DISABLE_THREADS)
     std::mutex m_SequenceMutex;
+#endif
 };
 
 } // namespace pipe